Class CheckInPageController


@Controller @RequestMapping("/manage-booking/check-in") public class CheckInPageController extends AbstractCheckinStepController
The type Check in page controller.
  • 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 given ReservationData and 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 ReservationData
      travellerReference - the travellerReference
      originDestinationRefNumber - 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

      public void setAPIDetails(APIForm apiForm, TravellerData savedTravellerData)
      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

      protected void updateTravellerPassengerInformationData(CheckInRequestData checkInRequest)
      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-in
      reservationData - 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 ReservationData
      originDestinationRefNumber - 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 provided
      passengerInformationData - the PassengerInformationData to be updated with API Details
    • getCheckinStep

      protected CheckinStep getCheckinStep()