Class CheckInPageController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
de.hybris.platform.travelacceleratorstorefront.controllers.pages.TravelAbstractPageController
de.hybris.platform.traveladdon.controllers.pages.steps.checkin.AbstractCheckinStepController
de.hybris.platform.traveladdon.controllers.pages.CheckInPageController
@Controller
@RequestMapping("/manage-booking/check-in")
public class CheckInPageController
extends AbstractCheckinStepController
The type Check in page controller.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.traveladdon.controllers.pages.steps.checkin.AbstractCheckinStepController
AbstractCheckinStepController.CheckinStepsNested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException -
Field Summary
Fields inherited from class de.hybris.platform.travelacceleratorstorefront.controllers.pages.TravelAbstractPageController
FIFTY_NINE, TEN, TWENTY_THREEFields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
CMS_PAGE_MODEL, CMS_PAGE_TITLE, PAGE_ROOT, REDIRECT_TO_LOGIN_FOR_CHECKOUT, REDIRECT_TO_MULTISTEP_CHECKOUT, REGISTRATION_CONSENT_ID, UTF_8Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyTravellerPassengerInformationData(TravellerData travellerDataFrom, TravellerData travellerDataTo) Copy traveller's passengerInformationData from one TravellerData to anotherdoCheckin(@Valid CheckInForm checkInForm, org.springframework.validation.BindingResult bindingResult, String bookingReference, int originDestinationRefNumber, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) protected voidfillCheckInFormWithAPIDetails(CheckInForm checkInForm, TravellerData travellerToCheckIn, ReservationData reservationData) This method fills the checkin form with traveller's API detailsgetCheckInPage(org.springframework.ui.Model model, String bookingReference, String travellerReference, int originDestinationRefNumber, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) getCheckInStatusPage(org.springframework.ui.Model model) protected CheckinStepgetCheckInSuccessPage(org.springframework.ui.Model model) getTransportOfferingCodeList(ReservationData reservationData, int originDestinationRefNumber) Returns the list of transportOffering codes of the reservationData for the specific originDestinationRefNumber.protected CheckInForminitialiseCheckInForm(ReservationData reservationData, String travellerReference, int originDestinationRefNumber) This methdo initializes a CheckIn.protected CheckInRequestDataprepareCheckInRequestFromForm(ReservationData reservationData, CheckInForm checkInForm, int originDestinationRefNumber) This method will create a new CheckInRequestData with the information gathered from the givenReservationDataand the AdvancePassengerInfo provided in the given CheckInFormprotected Optional<TravellerData>retrieveSavedTravellerIfExists(TravellerData travellerData, ReservationData reservationData) Returns TravellerData object based on the traveller status( i.e booker or traveller).voidsetAPIDetails(APIForm apiForm, TravellerData savedTravellerData) Populate APIForm data with API details of the saved passenger if exists.protected voidupdateAPIDataFromForm(APIForm apiForm, PassengerInformationData passengerInformationData) This method creates a new AdvancePassengerInfoData that will be populated with all the information coming from the given ApiForm.protected voidupdateTravellerPassengerInformationData(CheckInRequestData checkInRequest) Update traveller's passengerInformationData along with the passengerInformation of linked travellerMethods inherited from class de.hybris.platform.traveladdon.controllers.pages.steps.checkin.AbstractCheckinStepController
addCheckinStepsToModel, getCheckinFlowGroupMap, getCheckinStep, setCheckinStepLinksForModelMethods inherited from class de.hybris.platform.travelacceleratorstorefront.controllers.pages.TravelAbstractPageController
getConfigurationService, getDisableCurrencySelector, getJson, getReservationCode, getSiteUid, getTravelCartFacade, getTravelCustomerFacade, populateHours, populateMinutesMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
addRegistrationConsentDataToModel, checkRequestUrl, createMetaElement, decodeWithScheme, getBaseSiteService, getCheckoutRedirectUrl, getCmsPageService, getCmsPreviewService, getCmsSiteService, getConsentFacade, getContentPageForLabelOrId, getCurrencies, getCurrentCurrency, getCurrentLanguage, getCustomerFacade, getHostConfigService, getI18nService, getLanguages, getMessageSource, getPageTitleResolver, getRequestContextData, getSessionService, getSiteConfigService, getSiteName, getStoreSessionFacade, getUser, getUserFacade, getViewForPage, getViewForPage, prepareNotFoundPage, setUpMetaData, setUpMetaDataForContentPage, storeCmsPageInModel, storeContentPageTitleInModel, storeContinueUrl, urlEncodeMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
Constructor Details
-
CheckInPageController
public CheckInPageController()
-
-
Method Details
-
getCheckInPage
@RequestMapping(value="/{bookingReference}/{originDestinationRefNumber}", method=GET) public String getCheckInPage(org.springframework.ui.Model model, @PathVariable String bookingReference, @RequestParam(value="travellerReference",required=false) String travellerReference, @PathVariable int originDestinationRefNumber, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException - Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
doCheckin
@RequestMapping(value="/submit/{bookingReference}/{originDestinationRefNumber}", method=POST) public String doCheckin(@Valid @Valid CheckInForm checkInForm, org.springframework.validation.BindingResult bindingResult, @PathVariable String bookingReference, @PathVariable int originDestinationRefNumber, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) -
getCheckInSuccessPage
@RequestMapping(value="/success", method=GET) public String getCheckInSuccessPage(org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException - Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
getCheckInStatusPage
@RequestMapping(value="/failed", method=GET) public String getCheckInStatusPage(org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException - Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
prepareCheckInRequestFromForm
protected CheckInRequestData prepareCheckInRequestFromForm(ReservationData reservationData, CheckInForm checkInForm, int originDestinationRefNumber) This method will create a new CheckInRequestData with the information gathered from the givenReservationDataand the AdvancePassengerInfo provided in the given CheckInForm- Parameters:
reservationData-checkInForm-- Returns:
- the CheckInRequestData populated
-
initialiseCheckInForm
protected CheckInForm initialiseCheckInForm(ReservationData reservationData, String travellerReference, int originDestinationRefNumber) This methdo initializes a CheckIn. If the travellerReference is empty the form will be initialized for all the travellers in the given ReservationData, otherwise for the specified traveller identified by the travellerReference- Parameters:
reservationData- the ReservationDatatravellerReference- the travellerReferenceoriginDestinationRefNumber- the identifier of the leg for which we're checking in a/all traveller(s)- Returns:
- CheckInForm
-
fillCheckInFormWithAPIDetails
protected void fillCheckInFormWithAPIDetails(CheckInForm checkInForm, TravellerData travellerToCheckIn, ReservationData reservationData) This method fills the checkin form with traveller's API details- Parameters:
checkInForm-travellerToCheckIn-reservationData-
-
setAPIDetails
Populate APIForm data with API details of the saved passenger if exists.- Parameters:
apiForm- APIForm object.savedTravellerData- TravellerData object.
-
copyTravellerPassengerInformationData
protected void copyTravellerPassengerInformationData(TravellerData travellerDataFrom, TravellerData travellerDataTo) Copy traveller's passengerInformationData from one TravellerData to another- Parameters:
travellerDataFrom- TravellerData object.travellerDataTo- TravellerData object.
-
updateTravellerPassengerInformationData
Update traveller's passengerInformationData along with the passengerInformation of linked traveller- Parameters:
checkInRequest- CheckInRequestData object
-
retrieveSavedTravellerIfExists
protected Optional<TravellerData> retrieveSavedTravellerIfExists(TravellerData travellerData, ReservationData reservationData) Returns TravellerData object based on the traveller status( i.e booker or traveller). if current user is booker for current booking then it checks if the traveller is a booker, returns the travellerData of CustomerTravellerInstanceData, else, checks if the traveller is associated with a saved traveller for the logged in customer and returns it, else returns empty.- Parameters:
travellerData- TravellerData of the traveller attempting to check-inreservationData- the ReservationData- Returns:
- Optional
-
getTransportOfferingCodeList
protected List<String> getTransportOfferingCodeList(ReservationData reservationData, int originDestinationRefNumber) Returns the list of transportOffering codes of the reservationData for the specific originDestinationRefNumber.- Parameters:
reservationData- as the ReservationDataoriginDestinationRefNumber- as the int representing the originDestinationRefNumber- Returns:
- a List
of the transportOffering codes
-
updateAPIDataFromForm
protected void updateAPIDataFromForm(APIForm apiForm, PassengerInformationData passengerInformationData) This method creates a new AdvancePassengerInfoData that will be populated with all the information coming from the given ApiForm. The AdvancePassengerInfoData will be then linked to the given PassengerInformationData.- Parameters:
apiForm- the ApiForm to get the API Details providedpassengerInformationData- the PassengerInformationData to be updated with API Details
-
getCheckinStep
-