Class TravelCartsController
java.lang.Object
de.hybris.platform.coretravelcommonsocc.controllers.TravelBaseController
de.hybris.platform.coretravelcommonsocc.controllers.TravelCartsController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/carts")
public class TravelCartsController
extends TravelBaseController
Web Service Controller for the CARTS resource.
-
Field Summary
Fields inherited from class de.hybris.platform.coretravelcommonsocc.controllers.TravelBaseController
BASIC_FIELD_SET, DEFAULT_CURRENT_PAGE, DEFAULT_PAGE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPaymentDetailsInternal(CCPaymentInfoData paymentInfoData) Adds payment details to the cart.voidassignEmail(String email) voidchangeCurrency(String currencyIso) protected org.springframework.http.ResponseEntitycreateAmendCartFromOrderIdOrGuid(String fromOrderId, String fromOrderGuid, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) Create amend cart from order id response entity.org.springframework.http.ResponseEntitycreateCart(String fromOrderId, String fromOrderGuid, String oldCartId, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) voidcreateCartPaymentDetails(String cartId, PaymentDetailsWsDTO paymentDetails, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) org.springframework.http.ResponseEntityorg.springframework.http.ResponseEntityorg.springframework.http.ResponseEntityremoveCart(String cartId) org.springframework.http.ResponseEntityreplaceCartPaymentDetails(String paymentDetailsId) protected org.springframework.http.ResponseEntityrestoreAnonymousUserCart(String oldCartId, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) Restore anonymous user cart response entity.org.springframework.http.ResponseEntityvalidateCart(String salesApplication, String cartId) Methods inherited from class de.hybris.platform.coretravelcommonsocc.controllers.TravelBaseController
getAbsoluteLocationURL, getDataMapper, getErrorCode, getErrorCodeResolver, handleAccessDeniedException, handleMissingRequestHeaderException, handleTravelModelNotFoundException, sanitize, validate, validate
-
Constructor Details
-
TravelCartsController
public TravelCartsController()
-
-
Method Details
-
createCart
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(method=POST) @ResponseBody public org.springframework.http.ResponseEntity createCart(@RequestParam(required=false) String fromOrderId, @RequestParam(required=false) String fromOrderGuid, @RequestParam(required=false) String oldCartId, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) -
validateCart
@Secured({"ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/{cartId}/validate", method=POST) @ResponseBody public org.springframework.http.ResponseEntity validateCart(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable String cartId) -
getPaymentOptions
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="{cartId}/paymentOptions", method=GET) @ResponseBody public org.springframework.http.ResponseEntity getPaymentOptions() -
getCartReservationDetails
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/{cartId}", method=GET) @ResponseBody public org.springframework.http.ResponseEntity getCartReservationDetails() -
replaceCartPaymentDetails
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/{cartId}/paymentdetails", method=PUT) public org.springframework.http.ResponseEntity replaceCartPaymentDetails(@RequestParam String paymentDetailsId) -
createCartPaymentDetails
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/{cartId}/paymentdetails", method=POST, consumes={"application/json","application/xml"}) @ResponseStatus(CREATED) public void createCartPaymentDetails(@PathVariable String cartId, @RequestBody PaymentDetailsWsDTO paymentDetails, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) -
changeCurrency
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/{cartId}/currency", method=PUT) @ResponseStatus(NO_CONTENT) public void changeCurrency(@RequestParam(name="currencyISO",required=false) String currencyIso) -
assignEmail
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT","ROLE_GUEST"}) @RequestMapping(value="/{cartId}/email", method=PUT) @ResponseStatus(NO_CONTENT) public void assignEmail(@RequestParam(name="email") String email) -
removeCart
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/{cartId}", method=DELETE) public org.springframework.http.ResponseEntity removeCart(@PathVariable String cartId) -
addPaymentDetailsInternal
Adds payment details to the cart.- Parameters:
paymentInfoData- the payment info data
-
restoreAnonymousUserCart
protected org.springframework.http.ResponseEntity restoreAnonymousUserCart(String oldCartId, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) Restore anonymous user cart response entity.- Parameters:
oldCartId- the old cart idhttpServletRequest- the http servlet requesthttpServletResponse- the http servlet response- Returns:
- the response entity
-
createAmendCartFromOrderIdOrGuid
protected org.springframework.http.ResponseEntity createAmendCartFromOrderIdOrGuid(String fromOrderId, String fromOrderGuid, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) Create amend cart from order id response entity.- Parameters:
fromOrderId- the from order idhttpServletRequest- the http servlet requesthttpServletResponse- the http servlet response- Returns:
- the response entity
-