Class FlightCartsController
java.lang.Object
de.hybris.platform.coreairlinecommonsocc.controllers.AirlineBaseController
de.hybris.platform.coreairlineocc.controllers.FlightCartsController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/carts/{cartId}")
public class FlightCartsController
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 TypeMethodDescriptionorg.springframework.http.ResponseEntityaddAncillaryToCart(AncillaryEntryRequest ancillaryEntryRequest, String salesApplication, javax.servlet.http.HttpServletRequest httpServletRequest) org.springframework.http.ResponseEntity<?>addBaggageToCart(BaggageEntryRequest baggageEntryRequest, String salesApplication, javax.servlet.http.HttpServletRequest httpServletRequest) protected IntegeraddSolutionToCart(AddSolutionRequest addSolutionRequest) Adds a solution to the cart.voidaddSolutionToCart(AddSolutionRequest addSolutionRequest, String salesApplication, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) voidchangeSolution(Integer solutionID, String salesApplication, ChangeSolutionRequest changeSolutionRequest) org.springframework.http.ResponseEntitygetAncillaryEntry(String salesApplication, Integer entryId) org.springframework.http.ResponseEntity<AncillarySearchResponse>getAvailableAncillaries(String salesApplication, List<String> flightCode) Search ancillary productsorg.springframework.http.ResponseEntitygetBaggageEntry(String salesApplication, Integer entryId) org.springframework.http.ResponseEntity<BaggageSearchResponse>getBaggages(String salesApplication, List<String> flightCode) org.springframework.http.ResponseEntitygetSolutionPassenger(@NotBlank @Min(1L) Integer solutionID, String passengerId) org.springframework.http.ResponseEntitygetSolutionPassengers(@NotBlank @Min(1L) Integer solutionID) org.springframework.http.ResponseEntityremoveAncillaryCartEntry(String salesApplication, Integer entryId) Performs the deletes ancillary entry.voidremoveBaggageEntry(String salesApplication, Integer entryId) voidremoveSolution(String salesApplication, @NotBlank @Min(1L) Integer solutionID) org.springframework.http.ResponseEntityupdateAncillaryEntry(Integer entryId, AncillaryEntryRequest entry) org.springframework.http.ResponseEntityupdateBaggageEntry(Integer entryId, String salesApplication, BaggageEntryRequest baggageEntryRequest) voidupdateTraveller(@NotBlank @Min(1L) Integer solutionID, String passengerId, PassengerDetails passenger, boolean saveInProfile, javax.servlet.http.HttpServletResponse httpServletResponse) protected voidvalidateIfTransportOfferingsExistInCart(List<String> transportOfferingCodes) Validate if transport offerings exists in cart.Methods inherited from class de.hybris.platform.coreairlinecommonsocc.controllers.AirlineBaseController
createPaginationData, getAbsoluteLocationURL, getDataMapper, getErrorCode, getErrorCodeResolver, handleAccessDeniedException, handleMissingRequestHeaderException, handleTravelModelNotFoundException, sanitize, validate, validate
-
Constructor Details
-
FlightCartsController
public FlightCartsController()
-
-
Method Details
-
addSolutionToCart
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/solutions", method=POST) @ResponseStatus(CREATED) public void addSolutionToCart(@RequestBody @Nonnull AddSolutionRequest addSolutionRequest, @RequestHeader(name="sap.cx-sales-application") String salesApplication, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) -
changeSolution
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/solutions/{solutionID}/change", method=POST) @ResponseStatus(NO_CONTENT) public void changeSolution(@PathVariable(name="solutionID") Integer solutionID, @RequestHeader(name="sap.cx-sales-application") String salesApplication, @RequestBody @Nonnull ChangeSolutionRequest changeSolutionRequest) -
getBaggages
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CLIENT"}) @RequestMapping(value="/baggages", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<BaggageSearchResponse> getBaggages(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @RequestParam(required=false) List<String> flightCode) -
addBaggageToCart
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/baggageEntries", method=POST) @ResponseBody public org.springframework.http.ResponseEntity<?> addBaggageToCart(@RequestBody BaggageEntryRequest baggageEntryRequest, @RequestHeader(name="sap.cx-sales-application") String salesApplication, javax.servlet.http.HttpServletRequest httpServletRequest) -
addSolutionToCart
protected Integer addSolutionToCart(AddSolutionRequest addSolutionRequest) throws InternalServerErrorWsException Adds a solution to the cart.- Parameters:
addSolutionRequest- the add solution request- Returns:
- the solutionId of the solution added to the cart
- Throws:
InternalServerErrorWsException- the internal server error ws exception to be thrown when an error occurs during the add solution to the cart.
-
getAvailableAncillaries
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_CLIENT","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/ancillaries", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<AncillarySearchResponse> getAvailableAncillaries(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @RequestParam(required=false) List<String> flightCode) Search ancillary products- Returns:
AncillarySearchResponse
-
validateIfTransportOfferingsExistInCart
protected void validateIfTransportOfferingsExistInCart(List<String> transportOfferingCodes) throws TransportOfferingNotInCartWsException Validate if transport offerings exists in cart.- Parameters:
transportOfferingCodes- the transport offering codes- Throws:
TransportOfferingNotInCartWsException- the transport offerings not in cart ws exception
-
addAncillaryToCart
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/ancillaryEntries", method=POST) @ResponseBody public org.springframework.http.ResponseEntity addAncillaryToCart(@RequestBody AncillaryEntryRequest ancillaryEntryRequest, @RequestHeader(name="sap.cx-sales-application") String salesApplication, javax.servlet.http.HttpServletRequest httpServletRequest) -
removeAncillaryCartEntry
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/ancillaryEntries/{entryId}", method=DELETE) @ResponseBody public org.springframework.http.ResponseEntity removeAncillaryCartEntry(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable(name="entryId") Integer entryId) Performs the deletes ancillary entry.- Parameters:
entryId- the entry number- Returns:
- the response entity
-
updateBaggageEntry
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/baggageEntries/{entryId}", method=PATCH) @ResponseBody public org.springframework.http.ResponseEntity updateBaggageEntry(@PathVariable(name="entryId") Integer entryId, @RequestHeader(name="sap.cx-sales-application") String salesApplication, @RequestBody BaggageEntryRequest baggageEntryRequest) -
getBaggageEntry
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CLIENT"}) @RequestMapping(value="/baggageEntries/{entryId}", method=GET) @ResponseBody public org.springframework.http.ResponseEntity getBaggageEntry(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable Integer entryId) -
updateAncillaryEntry
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/ancillaryEntries/{entryId}", method=PATCH) @ResponseBody public org.springframework.http.ResponseEntity updateAncillaryEntry(@PathVariable(name="entryId") Integer entryId, @RequestBody AncillaryEntryRequest entry) -
updateTraveller
@Secured({"ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/solutions/{solutionID}/passengers/{passengerId}", method=PATCH) @ResponseStatus(NO_CONTENT) public void updateTraveller(@PathVariable(name="solutionID") @NotBlank @Min(1L) @NotBlank @Min(1L) Integer solutionID, @PathVariable String passengerId, @RequestBody PassengerDetails passenger, @RequestParam(required=false) boolean saveInProfile, javax.servlet.http.HttpServletResponse httpServletResponse) -
getSolutionPassengers
@Secured({"ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/solutions/{solutionID}/passengers", method=GET) @ResponseStatus(OK) public org.springframework.http.ResponseEntity getSolutionPassengers(@PathVariable(name="solutionID") @NotBlank @Min(1L) @NotBlank @Min(1L) Integer solutionID) -
getSolutionPassenger
@Secured({"ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/solutions/{solutionID}/passengers/{passengerId}", method=GET) @ResponseStatus(OK) public org.springframework.http.ResponseEntity getSolutionPassenger(@PathVariable(name="solutionID") @NotBlank @Min(1L) @NotBlank @Min(1L) Integer solutionID, @PathVariable String passengerId) -
removeBaggageEntry
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/baggageEntries/{entryId}", method=DELETE) @ResponseBody @ResponseStatus(NO_CONTENT) public void removeBaggageEntry(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable(name="entryId") Integer entryId) -
getAncillaryEntry
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/ancillaryEntries/{entryId}", method=GET) @ResponseBody public org.springframework.http.ResponseEntity getAncillaryEntry(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable(name="entryId") Integer entryId) -
removeSolution
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/solutions/{solutionID}", method=DELETE) @ResponseStatus(NO_CONTENT) public void removeSolution(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable(name="solutionID") @NotBlank @Min(1L) @NotBlank @Min(1L) Integer solutionID)
-