Class ExtendedCartsController

java.lang.Object
de.hybris.platform.acceleratorwebservicesaddon.controllers.v2.ExtendedCartsController

@Controller @RequestMapping("/{baseSiteId}/users/{userId}/carts") public class ExtendedCartsController extends Object
  • Constructor Details

    • ExtendedCartsController

      public ExtendedCartsController()
  • Method Details

    • getConsolidatedPickupLocations

      @RequestMapping(value="/{cartId}/consolidate", method=GET) @ResponseBody public PointOfServiceListWsDTO getConsolidatedPickupLocations(@RequestParam(defaultValue="DEFAULT") String fields)
    • createConsolidatedPickupLocation

      @RequestMapping(value="/{cartId}/consolidate", method=POST) @ResponseBody public CartModificationListWsDTO createConsolidatedPickupLocation(@RequestParam String storeName, @RequestParam(defaultValue="DEFAULT") String fields) throws CommerceCartModificationException
      Throws:
      CommerceCartModificationException
    • getSopPaymentRequestDetails

      @RequestMapping(value="/{cartId}/payment/sop/request", method=GET) @ResponseBody @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) public PaymentRequestWsDTO getSopPaymentRequestDetails(@RequestParam String responseUrl, @RequestParam(defaultValue="false") boolean extendedMerchantCallback, @PathVariable String baseSiteId, @PathVariable String userId, @PathVariable String cartId, @RequestParam(defaultValue="DEFAULT") String fields)
    • buildMerchantCallbackUrl

      protected String buildMerchantCallbackUrl(boolean extendedMerchantCallback, String baseSiteId, String userId, String cartId)
      Method build merchant callback url for given parameters
      Parameters:
      extendedMerchantCallback - Define which url should be returned
      baseSiteId - Base site identifier
      userId - User identifier
      cartId - Cart identifier
      Returns:
      merchant callback url
    • doHandleSopPaymentResponse

      @RequestMapping(value="/{cartId}/payment/sop/response", method=POST) @ResponseBody @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) public PaymentDetailsWsDTO doHandleSopPaymentResponse(javax.servlet.http.HttpServletRequest request, SopPaymentDetailsWsDTO sopPaymentDetails, @RequestParam(defaultValue="DEFAULT") String fields)
    • handlePaymentSubscriptionResultData

      protected CCPaymentInfoData handlePaymentSubscriptionResultData(PaymentSubscriptionResultData paymentSubscriptionResultData, org.springframework.validation.Errors errors)
      Method analyze payment subscription result data. If create subscription result is success it returns created payment info. Otherwise appropriate exception is thrown.
      Parameters:
      paymentSubscriptionResultData - Data to analyze
      errors - Object storing validation errors. Can be null - then empty error object will be created
      Returns:
      payment info
    • getSopPaymentResponse

      @RequestMapping(value="/{cartId}/payment/sop/response", method=GET) @ResponseBody @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) public PaymentDetailsWsDTO getSopPaymentResponse(@PathVariable String cartId, @RequestParam(defaultValue="DEFAULT") String fields, javax.servlet.http.HttpServletResponse response)
    • removeSopPaymentResponse

      @RequestMapping(value="/{cartId}/payment/sop/response", method=DELETE) @ResponseBody @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) public void removeSopPaymentResponse(@PathVariable String cartId)
    • getParameterMap

      protected Map<String,String> getParameterMap(javax.servlet.http.HttpServletRequest request)
    • validate

      protected org.springframework.validation.Errors validate(Object object, String objectName, org.springframework.validation.Validator validator)