Class SeatMapController
java.lang.Object
de.hybris.platform.coreairlinecommonsocc.controllers.AirlineBaseController
de.hybris.platform.coreairlineocc.controllers.SeatMapController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/carts/{cartId}")
public class SeatMapController
extends AirlineBaseController
Web Service Airline Carts Controller for services related to the seat in 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.ResponseEntityaddSeatsToCart(SeatEntryRequest seatEntryRQ, String salesApplication, javax.servlet.http.HttpServletRequest httpServletRequest) protected voidfilterOfferRequestByTransportOfferingCodes(List<String> flightCodes, OfferRequestData offersRequest) Filter offer request by removing transport offerings that doesn't contain in transportOfferingCodes.org.springframework.http.ResponseEntitygetSeatEntry(Integer entryId) org.springframework.http.ResponseEntity<SeatMapResponse>getSeatMap(List<String> flightCodes, String salesApplication) Gets seat map.org.springframework.http.ResponseEntityremoveSeatEntry(Integer entryId) Remove seat entry response entity.protected voidvalidateIfTransportOfferingsExistInCart(OfferRequestData offersRequest, 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
-
SeatMapController
public SeatMapController()
-
-
Method Details
-
getSeatEntry
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/seatEntries/{entryId}", method=GET) @ResponseBody public org.springframework.http.ResponseEntity getSeatEntry(@PathVariable Integer entryId) -
removeSeatEntry
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/seatEntries/{entryId}", method=DELETE) @ResponseBody public org.springframework.http.ResponseEntity removeSeatEntry(@PathVariable Integer entryId) Remove seat entry response entity.- Parameters:
entryId- the entry number- Returns:
- the response entity
-
getSeatMap
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/seatmap", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<SeatMapResponse> getSeatMap(@RequestParam(required=false) List<String> flightCodes, @RequestHeader(name="sap.cx-sales-application") String salesApplication) Gets seat map.- Parameters:
flightCodes- the transport offering codes- Returns:
- the seat map
- Throws:
FlightsNotInCartWsException- the transport offerings not in cart ws exception
-
addSeatsToCart
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/seatEntries", method=POST) @ResponseBody public org.springframework.http.ResponseEntity addSeatsToCart(@RequestBody SeatEntryRequest seatEntryRQ, @RequestHeader(name="sap.cx-sales-application") String salesApplication, javax.servlet.http.HttpServletRequest httpServletRequest) throws AirlineWebserviceException - Throws:
AirlineWebserviceException
-
validateIfTransportOfferingsExistInCart
protected void validateIfTransportOfferingsExistInCart(OfferRequestData offersRequest, List<String> transportOfferingCodes) throws FlightsNotInCartWsException Validate if transport offerings exists in cart.- Parameters:
offersRequest- the offers requesttransportOfferingCodes- the transport offering codes- Throws:
FlightsNotInCartWsException- the transport offerings not in cart ws exception
-
filterOfferRequestByTransportOfferingCodes
protected void filterOfferRequestByTransportOfferingCodes(List<String> flightCodes, OfferRequestData offersRequest) Filter offer request by removing transport offerings that doesn't contain in transportOfferingCodes.- Parameters:
flightCodes- the flight codesoffersRequest- the offers request
-