Class AccommodationCartsController
java.lang.Object
de.hybris.platform.coretravelcommonsocc.controllers.TravelBaseController
de.hybris.platform.coreaccommodationocc.controllers.AccommodationBaseController
de.hybris.platform.coreaccommodationocc.controllers.AccommodationCartsController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/carts/{cartId}")
public class AccommodationCartsController
extends AccommodationBaseController
Web Service Controller for the Accommodation Carts resource.
-
Field Summary
Fields inherited from class de.hybris.platform.coreaccommodationocc.controllers.AccommodationBaseController
ADULT, GUESTS_SEPARATOR, MAX_GUESTS_PER_ROOM, MAX_PAGE_LIMIT, MAX_RANGE_OF_STAY, MAX_ROOMS_QTY, QTY_SEPARATOR, ROOMS_SEPARATORFields 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 TypeMethodDescriptionorg.springframework.http.ResponseEntityaddLeadGuestDetails(LeadGuest leadGuestDetails, Integer roomStayRefNumber) org.springframework.http.ResponseEntityaddRoomStay(String salesApplication, AddRoomStayToCartRequest request, javax.servlet.http.HttpServletRequest httpServletRequest) voidchangeRoomStayDates(String salesApplication, String cartId, UpdateRoomStaysRequest updateRoomStaysRequest) voidcreateServiceEntry(String salesApplication, AddServiceEntryRequest request, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) voiddeleteAccommodationServiceEntry(Integer entryId) org.springframework.http.ResponseEntitydeleteRoomStay(Integer roomStayRefNumber) org.springframework.http.ResponseEntitygetAccommodationServiceEntry(Integer entryId) org.springframework.http.ResponseEntitygetAvailableAccommodationServices(String salesApplication, String roomStayRefNumber) org.springframework.http.ResponseEntity<GuaranteeList>getGuaranteesForRoomStay(String salesApplication, String roomStayRefNumber) org.springframework.http.ResponseEntity<CancelPenaltyList>getPenaltiesForRoomStay(String salesApplication, String roomStayRefNumber) protected List<PassengerTypeQuantityData>preparePassengerTypeQuantityDataList(LeadGuest leadGuestDetails) Prepare list ofPassengerTypeQuantityDatafromvoidupdateServiceEntry(String salesApplication, AddServiceEntryRequest addServiceEntry, Integer entryId) protected voidvalidateGuestOccupancy(LeadGuest leadGuestDetails, List<GuestOccupancyData> guestOccupancies, List<String> passengerCodes) Methods inherited from class de.hybris.platform.coreaccommodationocc.controllers.AccommodationBaseController
createAccommodationAvailabilityRequestData, createAccommodationAvailabilityRequestData, createCriterionData, createPageableData, createPassengerTypeQuantityData, createRoomStayCandidateData, createRoomStayCandidates, createStayDateRangeData, findPassengerTypeByCode, getAccommodationOfferingFacade, getConfigurationService, getPassengerTypeDuplicates, getPassengerTypeFacade, parseDate, validateAdultsPerRoom, validatePassengerTypeQuantities, validateRoomStayCandidates, validateStayDurationMethods inherited from class de.hybris.platform.coretravelcommonsocc.controllers.TravelBaseController
getAbsoluteLocationURL, getDataMapper, getErrorCode, getErrorCodeResolver, handleAccessDeniedException, handleMissingRequestHeaderException, handleTravelModelNotFoundException, sanitize, validate, validate
-
Constructor Details
-
AccommodationCartsController
public AccommodationCartsController()
-
-
Method Details
-
addRoomStay
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/roomStays", method=POST) @ResponseStatus(CREATED) public org.springframework.http.ResponseEntity addRoomStay(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @RequestBody AddRoomStayToCartRequest request, javax.servlet.http.HttpServletRequest httpServletRequest) throws de.hybris.platform.webservicescommons.errors.exceptions.WebserviceValidationException - Throws:
de.hybris.platform.webservicescommons.errors.exceptions.WebserviceValidationException
-
getAvailableAccommodationServices
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/roomStays/{roomStayRefNumber}/accommodationServices", method=GET) @ResponseBody public org.springframework.http.ResponseEntity getAvailableAccommodationServices(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable String roomStayRefNumber) -
createServiceEntry
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/serviceEntries", method=POST) @ResponseStatus(CREATED) public void createServiceEntry(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @RequestBody AddServiceEntryRequest request, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws de.hybris.platform.webservicescommons.errors.exceptions.WebserviceValidationException - Throws:
de.hybris.platform.webservicescommons.errors.exceptions.WebserviceValidationException
-
updateServiceEntry
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CLIENT"}) @RequestMapping(value="serviceEntries/{entryId}", method=PATCH) @ResponseStatus(NO_CONTENT) public void updateServiceEntry(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @RequestBody AddServiceEntryRequest addServiceEntry, @PathVariable Integer entryId) throws de.hybris.platform.webservicescommons.errors.exceptions.WebserviceValidationException - Throws:
de.hybris.platform.webservicescommons.errors.exceptions.WebserviceValidationException
-
getAccommodationServiceEntry
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/serviceEntries/{entryId}", method=GET) @ResponseBody public org.springframework.http.ResponseEntity getAccommodationServiceEntry(@PathVariable(name="entryId") Integer entryId) -
deleteAccommodationServiceEntry
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/serviceEntries/{entryId}", method=DELETE) @ResponseBody @ResponseStatus(NO_CONTENT) public void deleteAccommodationServiceEntry(@PathVariable(name="entryId") Integer entryId) -
addLeadGuestDetails
@Secured({"ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/roomStays/{roomStayRefNumber}/leadGuest", method=PUT) @ResponseStatus(NO_CONTENT) public org.springframework.http.ResponseEntity addLeadGuestDetails(@RequestBody LeadGuest leadGuestDetails, @PathVariable("roomStayRefNumber") Integer roomStayRefNumber) -
changeRoomStayDates
@Secured({"ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/changeStayDates", method=POST) @ResponseStatus(NO_CONTENT) public void changeRoomStayDates(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable String cartId, @RequestBody UpdateRoomStaysRequest updateRoomStaysRequest) -
deleteRoomStay
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/roomStays/{roomStayRefNumber}", method=DELETE) public org.springframework.http.ResponseEntity deleteRoomStay(@PathVariable("roomStayRefNumber") Integer roomStayRefNumber) -
getGuaranteesForRoomStay
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/roomStays/{roomStayRefNumber}/guarantees", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<GuaranteeList> getGuaranteesForRoomStay(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable String roomStayRefNumber) -
getPenaltiesForRoomStay
@Secured({"ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/roomStays/{roomStayRefNumber}/cancelPenalties", method=GET) @ResponseBody public org.springframework.http.ResponseEntity<CancelPenaltyList> getPenaltiesForRoomStay(@RequestHeader(name="sap.cx-sales-application") String salesApplication, @PathVariable String roomStayRefNumber) -
validateGuestOccupancy
protected void validateGuestOccupancy(LeadGuest leadGuestDetails, List<GuestOccupancyData> guestOccupancies, List<String> passengerCodes) -
preparePassengerTypeQuantityDataList
protected List<PassengerTypeQuantityData> preparePassengerTypeQuantityDataList(LeadGuest leadGuestDetails) Prepare list ofPassengerTypeQuantityDatafrom- Parameters:
leadGuestDetails-- Returns:
- list of
-