Interface TravellerFacade

All Known Subinterfaces:
ShoppingTravellerFacade
All Known Implementing Classes:
DefaultShoppingTravellerFacade, DefaultTravellerFacade

public interface TravellerFacade
Facade that exposes Traveller specific services
  • Method Details

    • createTraveller

      TravellerData createTraveller(String travellerType, String passengerType, String travellerCode, int passengerNumber, String travellerUidPrefix)
      Creates a new instance of TravellerData with relevant details populated
      Parameters:
      travellerType - the traveller type
      passengerType - the passenger type
      travellerCode - the traveller code
      passengerNumber - the passenger number
      travellerUidPrefix - the traveller uid prefix
      Returns:
      newly created instance of Traveller
    • createTraveller

      TravellerData createTraveller(String travellerType, String passengerType, String travellerCode, int passengerNumber, String travellerUidPrefix, String cartOrOrderCode)
      Creates a new instance of TravellerData with relevant details populated
      Parameters:
      travellerType - the traveller type
      passengerType - the passenger type
      travellerCode - the traveller code
      passengerNumber - the passenger number
      travellerUidPrefix - the traveller uid prefix
      cartOrOrderCode - the cartOrOrderCode
      Returns:
      newly created instance of Traveller
    • getReasonForTravelTypes

      List<ReasonForTravelData> getReasonForTravelTypes()
      Facade which returns a list of ReasonForTravel types
      Returns:
      List reason for travel types
    • getTravellersForCartEntries

      List<TravellerData> getTravellersForCartEntries()
      Method returns a unique list of travellers from the Cart Entries
      Returns:
      List travellers for cart entries
    • getSavedTravellersForCurrentUser

      List<TravellerData> getSavedTravellersForCurrentUser()
      Method returns a list of saved travellers that are assigned to the current logged in User
      Returns:
      List saved travellers for current user
    • updateTravellerDetails

      @Deprecated void updateTravellerDetails(List<TravellerData> travellers)
      Deprecated.
      Deprecated since version 6.0. Use updateAndGetExistingTravellerDetails(List) instead.
      Update traveller details.
      Parameters:
      travellers - the travellers
    • updateAndGetExistingTravellerDetails

      List<TravellerData> updateAndGetExistingTravellerDetails(List<TravellerData> travellers)
      Update and return traveller details.
      Parameters:
      travellers - the travellers
      Returns:
      the list of traveller data
    • updateCustomerSavedTravellers

      void updateCustomerSavedTravellers(List<TravellerData> travellers)
      Update customer saved travellers.
      Parameters:
      travellers - the travellers
    • getCurrentUserDetails

      TravellerData getCurrentUserDetails()
      Method returns the CustomerTravellerInstance details from the current User
      Returns:
      TravellerData current user details
    • isAnonymousUser

      boolean isAnonymousUser()
      Method checks to see if the current user is a logged in User or not
      Returns:
      boolean boolean
    • getTraveller

      TravellerData getTraveller(String travellerId)
      Method returns the TravellerInstance details for the traveller id
      Parameters:
      travellerId - the traveller id
      Returns:
      TravellerData traveller
    • getTraveller

      TravellerData getTraveller(String travellerId, String bookingInfo)
      Method returns the TravellerInstance details for the traveller id and bookingInfo
      Parameters:
      travellerId - the traveller id
      bookingInfo - the bookingInfo
      Returns:
      TravellerData traveller
    • getTravellerFromCurrentCart

      TravellerData getTravellerFromCurrentCart(String travellerCode)
      Method returns the TravellerInstance identified by the travellerCode from the current Cart Session
      Parameters:
      travellerCode - the traveller code
      Returns:
      TravellerData traveller from current cart
    • removeSavedTraveller

      TravellerData removeSavedTraveller(String uid)
      Method removes the traveller with the uid from the current users list of saved travellers. If successful, the method will return the TravellerData for the traveller that has been removed otherwise it will return null if remove was unsuccessful.
      Parameters:
      uid - the uid
      Returns:
      TravellerData traveller data
    • updateCurrentUserSpecialRequestDetails

      void updateCurrentUserSpecialRequestDetails(List<String> specialServiceRequestCode)
      Method retrieves a list of SpecialServiceRequestModels from the database based on the list of specialServiceRequestCode and then sets the list of SpecialServiceRequestModels against the Current Users account
      Parameters:
      specialServiceRequestCode - the special service request code
    • retrieveTravellers

      List<TravellerData> retrieveTravellers(ReservationData reservationData, int originDestinationRefNumber)
      This method will return the list of travellers for the given originDestinationRefNumber in the given ReservationData. Empty list if there's no leg found with the given originDestinationRefNumber in the ReservationData
      Parameters:
      reservationData - the ReservationData representing a booking
      originDestinationRefNumber - the identifier of a leg
      Returns:
      the List of travellers
    • getTravellerPreferences

      List<TravellerPreferenceData> getTravellerPreferences()
      Method get a list of traveller preference for the currently logged in user
      Returns:
      List traveller preferences
    • getSaveTravellerPreferences

      void getSaveTravellerPreferences(List<TravellerPreferenceData> selectedTravellerPreferences)
      Method take a list of traveller preferences and saves them against the current users account
      Parameters:
      selectedTravellerPreferences - the selected traveller preferences
    • updatePassengerInformation

      void updatePassengerInformation(TravellerData travellerData)
      Method saves the Passenger Information against the current user
      Parameters:
      travellerData - the traveller data
    • getPassengerInformation

      PassengerInformationData getPassengerInformation()
      Method gets the Passenger Information from the current user
      Returns:
      current user's passenger information
    • getCustomerTravellerInstanceData

      TravellerData getCustomerTravellerInstanceData()
      This method returns the traveller data for the currentLogged in customer.
      Returns:
      TravellerData instance of current customer
    • populateTravellersNamesMap

      Map<String,Map<String,String>> populateTravellersNamesMap(List<TravellerData> travellerDatas)
      This method populates a Map of Traveller Code with their display names for a given Passenger Type code
      Parameters:
      travellerDatas - the traveller datas
      Returns:
      Map > object
    • findSavedTravellersUsingFirstName

      List<TravellerData> findSavedTravellersUsingFirstName(String text, String passengerType)
      Retrieves a list of travelers using first name text against the current customer
      Parameters:
      text - the text
      passengerType - the passenger type
      Returns:
      list
    • findSavedTravellersUsingSurname

      List<TravellerData> findSavedTravellersUsingSurname(String text, String passengerType)
      Retrieves a list of travelers using last name text against the current customer
      Parameters:
      text - the text
      passengerType - the passenger type
      Returns:
      list
    • getSavedTravellersForUser

      List<TravellerData> getSavedTravellersForUser(String userId)
      Method returns a list of saved travellers that are saved against the given user
      Parameters:
      userId - - the user Id for which saved traveller need to be retrieved
      Returns:
      List saved travellers for the given user
    • getSavedSearchesForUser

      SavedSearchDataList getSavedSearchesForUser(String userId)
      Returns the list of saved searches that are saved in the user profile.
      Parameters:
      userId - the userId
      Returns:
      the list of saved searches
    • saveAdvancePassengerInformation

      void saveAdvancePassengerInformation(String orderId, String travellerId, PassengerInformationData passengerInformationData)
      Save advance passenger information.
      Parameters:
      orderId - the order id
      travellerId - the traveller id
      passengerInformationData - the passenger information data
    • validateBeforeCheckIn

      void validateBeforeCheckIn(String orderId, String travellerId, String boundIdentifier) throws OrderNotFoundException, de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException, InvalidOrderStatusException, InvalidUserException, InvalidTravellerException, BoundIdNotFoundException, TravellerAlreadyCheckedInException, MissingPassengerInformationException, FieldValueNotFoundException
      Validate before check in.
      Parameters:
      orderId - the order id
      travellerId - the traveller id
      boundIdentifier - the bound identifier
      Throws:
      OrderNotFoundException - the order not found exception
      de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException - the when traveller not found
      InvalidOrderStatusException - the when order status is not active
      InvalidUserException - the when current user is not associated with order
      InvalidTravellerException - the when given traveller is not associated with order
      BoundIdNotFoundException - the bound id not found exception
      TravellerAlreadyCheckedInException - the traveller already checked in exception
      MissingPassengerInformationException - the missing passenger information exception
      MissingPassengerInformationException - the field value not found exception
      FieldValueNotFoundException
    • getAdvancePassengerInformation

      PassengerInformationData getAdvancePassengerInformation(String orderId, String travellerId)
      Gets advance passenger information.
      Parameters:
      orderId - the order id
      travellerId - the traveller id
      Returns:
      the advance passenger information
    • getSessionCartTravellerForUid

      TravellerData getSessionCartTravellerForUid(String uid)
      Method gets traveller from session cart for given uid.
      Parameters:
      uid - the uid of the traveller
      Returns:
      the traveller data
    • getTravellersFromCart

      List<TravellerData> getTravellersFromCart()
      Method gets travellers from session cart.
      Returns:
      the traveller data
    • getTravellerFromCart

      TravellerData getTravellerFromCart(String travellerUid)
      Method gets traveller from session cart for the given uid.
      Parameters:
      travellerUid - the uid of the traveller
      Returns:
      the traveller data
    • getTravellersFromOrder

      List<TravellerData> getTravellersFromOrder(String orderId)
      Method gets travellers from order.
      Parameters:
      orderId - the order id
      Returns:
      the traveller data
    • getTravellerFromOrder

      TravellerData getTravellerFromOrder(String orderId, String travellerUid)
      Method gets traveller from order for the given uid.
      Parameters:
      orderId - the order id
      travellerUid - the uid of the traveller
      Returns:
      the traveller data