Package org.openquark.cal.internal.runtime.lecc

Examples of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_10$_2


   * @return Returns the calculation results.
   */
  private List<Result> getResultList(
      final MendozaMerchantCalculation merchantCalculation) {
    log.trace("Entering getResultList");
    MerchantCalculationResults result =
      merchantCalculation.getMerchantCalculationResult();
     MerchantCalculationResults.Results results = result.getResults();
     log.trace("Leaving getResultList");
     return results.getResult();
  }
View Full Code Here


      public MerchantCalculationResults calculate(final Long buyerId,
          final ShoppingCart cart, final String language,
          final MerchantCalculationCallback callback) {
        System.out.println(
            "Merchant Sample App: Merchant calculation callback received");
        return new MerchantCalculationResults();
      };
    };

    /* Create the merchant order listener */
    OrderListener orderListener = new OrderListener() {
View Full Code Here

    Object result = calculationListener.calculate(
        getBuyerId(), getShoppingCart(), getBuyerLanguage(), this);

    if (result instanceof MerchantCalculationResults) {
      MerchantCalculationResults results = (MerchantCalculationResults) result;
      ObjectFactory factory = new ObjectFactory();
      return factory.createMerchantCalculationResults(results);
    } else if (result instanceof String) {
      String stringResult = (String) result;
      return stringResult;
View Full Code Here

      log.debug("The merchant calculation result message is not a valid XML: "
      + validationMessage);
    }

    MerchantCalculationCallback merchantCalculationCallback = null;
    MerchantCalculationResults merchantCalculationResult = null;
    try {
      /* Callback */
      JAXBElement callbackNode =
        (JAXBElement) CartUtils.unmarshal(callbackMsg);
      merchantCalculationCallback =
View Full Code Here

  /** Sets the notifications that belongs to a specific order number.
   */
  private void updateNotifications() {
    log.trace("Entering setNotifications");
    NewOrderNotification non =
      proxyMessages.getNewOrderNotification(serverState.getGoogleOrderNumber());
    if (non != null) {
      setNewOrderNotification(non);
    }
    RiskInformationNotification risk =
View Full Code Here

   * @param cart The cart as generated by jaxb. It cannot be null.
   *
   * @return Returns a xml string.
   */
  public static String toXml(final CheckoutShoppingCart cart) {
    ObjectFactory factory = new ObjectFactory();
    return marshal(factory.createCheckoutShoppingCart(cart));
  }
View Full Code Here

    Object result = calculationListener.calculate(
        getBuyerId(), getShoppingCart(), getBuyerLanguage(), this);

    if (result instanceof MerchantCalculationResults) {
      MerchantCalculationResults results = (MerchantCalculationResults) result;
      ObjectFactory factory = new ObjectFactory();
      return factory.createMerchantCalculationResults(results);
    } else if (result instanceof String) {
      String stringResult = (String) result;
      return stringResult;
    } else {
      throw new RuntimeException(
View Full Code Here

  private void setNewOrderNotification(
      final NewOrderNotification theNewOrderNotification) {
    log.trace("Entering setNewOrderNotification");
    String marshaled = "";
    try {
      ObjectFactory objectFactory = new ObjectFactory();
      marshaled = CartUtils.marshal(
          objectFactory.createNewOrderNotification(theNewOrderNotification),
          true);
      marshaled = marshaled.trim();
    } catch (Exception e) {
      log.trace("Leaving setMerchantCalculation");
      throw new RuntimeException(e);
View Full Code Here

  private void setRiskInformationNotification(
      final RiskInformationNotification riskInformation) {
    log.trace("Entering setRiskInformationNotification");
    String marshaled = "";
    try {
      ObjectFactory objectFactory = new ObjectFactory();
      marshaled = CartUtils.marshal(
          objectFactory.createRiskInformationNotification(riskInformation),
          true);
      marshaled = marshaled.trim();
    } catch (Exception e) {
      log.trace("Leaving setRiskInformationNotification");
      throw new RuntimeException(e);
View Full Code Here

    NewOrderNotification non =
      proxyMessages.getNewOrderNotification(serverState.getGoogleOrderNumber());
    if (non != null) {
      setNewOrderNotification(non);
    }
    RiskInformationNotification risk =
      proxyMessages.getRiskInformationNotification(
          serverState.getGoogleOrderNumber());
    if (risk != null) {
      setRiskInformationNotification(risk);
    }
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_10$_2

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.