Class AirlineCartsController
java.lang.Object
de.hybris.platform.coreairlinecommonsocc.controllers.AirlineBaseController
de.hybris.platform.coreairlinecommonsocc.controllers.AirlineCartsController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/carts")
public class AirlineCartsController
extends AirlineBaseController
Web Service Airline Carts Controller for services related to the cart.
-
Field Summary
Fields inherited from class de.hybris.platform.coreairlinecommonsocc.controllers.AirlineBaseController
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 StringcreateAmendCartFromOrderId(String fromOrderId) Create amend cart from order id response entity.voidcreateCart(String oldCartId, String fromOrderId, String fromOrderGuid, 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) protected RequestSupportedStrategyGets airline payment provider request supported strategy.org.springframework.http.ResponseEntityprotected de.hybris.platform.commercefacades.order.CheckoutFacadeGets checkout facade.protected org.springframework.validation.ValidatorGets payment details validator.org.springframework.http.ResponseEntityprotected TravelCartFacadeGets travel cart facade.protected TravelCheckoutFacadeGets travel checkout facade.protected de.hybris.platform.commercefacades.user.UserFacadeGets user facade.org.springframework.http.ResponseEntityremoveCart(String cartId) org.springframework.http.ResponseEntityreplaceCartPaymentDetails(String paymentDetailsId) protected voidrestoreAnonymousCart(String oldCartId) Assign the anonymous cart to the current user.org.springframework.http.ResponseEntityvalidateCart(String cartId, String salesApplication) Methods inherited from class de.hybris.platform.coreairlinecommonsocc.controllers.AirlineBaseController
createPaginationData, getAbsoluteLocationURL, getDataMapper, getErrorCode, getErrorCodeResolver, handleAccessDeniedException, handleMissingRequestHeaderException, handleTravelModelNotFoundException, sanitize, validate, validate
-
Constructor Details
-
AirlineCartsController
public AirlineCartsController()
-
-
Method Details
-
createCart
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(method=POST) @ResponseStatus(CREATED) public void createCart(@RequestParam(required=false) String oldCartId, @RequestParam(required=false) String fromOrderId, @RequestParam(required=false) String fromOrderGuid, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) -
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() -
createCartPaymentDetails
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_GUEST","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) throws NoCheckoutCartWsException, UnsupportedRequestWsException -
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") String currencyISO) -
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) -
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) -
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) -
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() -
addPaymentDetailsInternal
Adds payment details to the cart.- Parameters:
paymentInfoData- the payment info data
-
validateCart
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/{cartId}/validate", method=POST) @ResponseBody public org.springframework.http.ResponseEntity validateCart(@PathVariable String cartId, @RequestHeader(name="sap.cx-sales-application") String salesApplication) -
restoreAnonymousCart
Assign the anonymous cart to the current user.- Parameters:
oldCartId- the anonymous cart identifier- Throws:
CartWsException- in case of errors during cart restoration
-
createAmendCartFromOrderId
Create amend cart from order id response entity.- Parameters:
fromOrderId- the from order id- Returns:
- the cart code
-
getTravelCartFacade
Gets travel cart facade.- Returns:
- the travel cart facade
-
getUserFacade
protected de.hybris.platform.commercefacades.user.UserFacade getUserFacade()Gets user facade.- Returns:
- the user facade
-
getCheckoutFacade
protected de.hybris.platform.commercefacades.order.CheckoutFacade getCheckoutFacade()Gets checkout facade.- Returns:
- the checkout facade
-
getPaymentDetailsValidator
protected org.springframework.validation.Validator getPaymentDetailsValidator()Gets payment details validator.- Returns:
- the payment details validator
-
getAirlinePaymentProviderRequestSupportedStrategy
Gets airline payment provider request supported strategy.- Returns:
- the airline payment provider request supported strategy
-
getTravelCheckoutFacade
Gets travel checkout facade.- Returns:
- the travel checkout facade
-