Package com.globant.google.mendoza.command

Examples of com.globant.google.mendoza.command.MendozaCommandResult


      }
      MendozaRequest request = new MendozaRequest(
          uri, method, header, params, message);
      DefaultResultDecorator decorator = new DefaultResultDecorator();
      httpServer.setContentType(DefaultResultDecorator.CONTENT_TYPE);
      MendozaCommandResult commandResult = null;
      String result = "Command '" + uri + "' not found";
      if ("/mendoza/checkout".equals(uri)) {
        commandResult = mendozaServer.checkout(request);
      } else if ("/mendoza/checkout/encoded".equals(uri)) {
        commandResult = mendozaServer.checkoutEncoded(request);
      } else if ("/mendoza/login".equals(uri)) {
        commandResult = mendozaServer.login(request);
      } else if ("/mendoza/reset".equals(uri)) {
        commandResult = mendozaServer.reset(request);
      } else if ("/mendoza/signature".equals(uri)) {
        commandResult = mendozaServer.assertSignature(request);
      } else if ("/mendoza/cart".equals(uri)) {
        commandResult = mendozaServer.assertCart(request);
      } else if ("/mendoza/merchant".equals(uri)) {
        commandResult = mendozaServer.changeMerchant(request);
      } else if ("/mendoza/coupon".equals(uri)) {
        commandResult = mendozaServer.addCoupon(request);
      } else if ("/mendoza/gift".equals(uri)) {
        commandResult = mendozaServer.addGiftCertificate(request);
      } else if ("/mendoza/status".equals(uri)) {
        commandResult = mendozaServer.status(request);
      } else if ("/mendoza/placeorder".equals(uri)) {
        commandResult = mendozaServer.placeOrder(request);
      } else if ("/mendoza/charge".equals(uri)) {
        commandResult = mendozaServer.chargeOrder(request);
      } else if ("/mendoza/cancel".equals(uri)) {
        commandResult = mendozaServer.cancelOrder(request);
      } else if ("/mendoza/refund".equals(uri)) {
        commandResult = mendozaServer.refundOrder(request);
      } else if ("/mendoza/help".equals(uri)) {
        commandResult = mendozaServer.help(request);
        httpServer.setContentType("text/html");
      }

      if (commandResult != null) {
        result = commandResult.decorate(decorator);
      }
      log.trace("Leaving receive");
      return result;
    }
View Full Code Here

TOP

Related Classes of com.globant.google.mendoza.command.MendozaCommandResult

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.