Interface TravellerFacade
- All Known Subinterfaces:
ShoppingTravellerFacade
- All Known Implementing Classes:
DefaultShoppingTravellerFacade,DefaultTravellerFacade
public interface TravellerFacade
Facade that exposes Traveller specific services
-
Method Summary
Modifier and TypeMethodDescriptioncreateTraveller(String travellerType, String passengerType, String travellerCode, int passengerNumber, String travellerUidPrefix) Creates a new instance of TravellerData with relevant details populatedcreateTraveller(String travellerType, String passengerType, String travellerCode, int passengerNumber, String travellerUidPrefix, String cartOrOrderCode) Creates a new instance of TravellerData with relevant details populatedfindSavedTravellersUsingFirstName(String text, String passengerType) Retrieves a list of travelers using first name text against the current customerfindSavedTravellersUsingSurname(String text, String passengerType) Retrieves a list of travelers using last name text against the current customergetAdvancePassengerInformation(String orderId, String travellerId) Gets advance passenger information.Method returns the CustomerTravellerInstance details from the current UserThis method returns the traveller data for the currentLogged in customer.Method gets the Passenger Information from the current userFacade which returns a list of ReasonForTravel typesgetSavedSearchesForUser(String userId) Returns the list of saved searches that are saved in the user profile.Method returns a list of saved travellers that are assigned to the current logged in UsergetSavedTravellersForUser(String userId) Method returns a list of saved travellers that are saved against the given uservoidgetSaveTravellerPreferences(List<TravellerPreferenceData> selectedTravellerPreferences) Method take a list of traveller preferences and saves them against the current users accountMethod gets traveller from session cart for given uid.getTraveller(String travellerId) Method returns the TravellerInstance details for the traveller idgetTraveller(String travellerId, String bookingInfo) Method returns the TravellerInstance details for the traveller id and bookingInfogetTravellerFromCart(String travellerUid) Method gets traveller from session cart for the given uid.getTravellerFromCurrentCart(String travellerCode) Method returns the TravellerInstance identified by the travellerCode from the current Cart SessiongetTravellerFromOrder(String orderId, String travellerUid) Method gets traveller from order for the given uid.Method get a list of traveller preference for the currently logged in userMethod returns a unique list of travellers from the Cart EntriesMethod gets travellers from session cart.getTravellersFromOrder(String orderId) Method gets travellers from order.booleanMethod checks to see if the current user is a logged in User or notpopulateTravellersNamesMap(List<TravellerData> travellerDatas) This method populates a Map of Traveller Code with their display names for a given Passenger Type codeMethod removes the traveller with the uid from the current users list of saved travellers.retrieveTravellers(ReservationData reservationData, int originDestinationRefNumber) This method will return the list of travellers for the given originDestinationRefNumber in the given ReservationData.voidsaveAdvancePassengerInformation(String orderId, String travellerId, PassengerInformationData passengerInformationData) Save advance passenger information.updateAndGetExistingTravellerDetails(List<TravellerData> travellers) Update and return traveller details.voidupdateCurrentUserSpecialRequestDetails(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 accountvoidupdateCustomerSavedTravellers(List<TravellerData> travellers) Update customer saved travellers.voidupdatePassengerInformation(TravellerData travellerData) Method saves the Passenger Information against the current uservoidupdateTravellerDetails(List<TravellerData> travellers) Deprecated.Deprecated since version 6.0.voidvalidateBeforeCheckIn(String orderId, String travellerId, String boundIdentifier) Validate before check in.
-
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 typepassengerType- the passenger typetravellerCode- the traveller codepassengerNumber- the passenger numbertravellerUidPrefix- 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 typepassengerType- the passenger typetravellerCode- the traveller codepassengerNumber- the passenger numbertravellerUidPrefix- the traveller uid prefixcartOrOrderCode- 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.Deprecated since version 6.0. UseupdateAndGetExistingTravellerDetails(List)instead.Update traveller details.- Parameters:
travellers- the travellers
-
updateAndGetExistingTravellerDetails
Update and return traveller details.- Parameters:
travellers- the travellers- Returns:
- the list of traveller data
-
updateCustomerSavedTravellers
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
Method returns the TravellerInstance details for the traveller id- Parameters:
travellerId- the traveller id- Returns:
- TravellerData traveller
-
getTraveller
Method returns the TravellerInstance details for the traveller id and bookingInfo- Parameters:
travellerId- the traveller idbookingInfo- the bookingInfo- Returns:
- TravellerData traveller
-
getTravellerFromCurrentCart
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
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
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 bookingoriginDestinationRefNumber- 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
Method take a list of traveller preferences and saves them against the current users account- Parameters:
selectedTravellerPreferences- the selected traveller preferences
-
updatePassengerInformation
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
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
Retrieves a list of travelers using first name text against the current customer- Parameters:
text- the textpassengerType- the passenger type- Returns:
- list
-
findSavedTravellersUsingSurname
Retrieves a list of travelers using last name text against the current customer- Parameters:
text- the textpassengerType- the passenger type- Returns:
- list
-
getSavedTravellersForUser
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
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 idtravellerId- the traveller idpassengerInformationData- 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 idtravellerId- the traveller idboundIdentifier- the bound identifier- Throws:
OrderNotFoundException- the order not found exceptionde.hybris.platform.servicelayer.exceptions.UnknownIdentifierException- the when traveller not foundInvalidOrderStatusException- the when order status is not activeInvalidUserException- the when current user is not associated with orderInvalidTravellerException- the when given traveller is not associated with orderBoundIdNotFoundException- the bound id not found exceptionTravellerAlreadyCheckedInException- the traveller already checked in exceptionMissingPassengerInformationException- the missing passenger information exceptionMissingPassengerInformationException- the field value not found exceptionFieldValueNotFoundException
-
getAdvancePassengerInformation
Gets advance passenger information.- Parameters:
orderId- the order idtravellerId- the traveller id- Returns:
- the advance passenger information
-
getSessionCartTravellerForUid
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
Method gets traveller from session cart for the given uid.- Parameters:
travellerUid- the uid of the traveller- Returns:
- the traveller data
-
getTravellersFromOrder
Method gets travellers from order.- Parameters:
orderId- the order id- Returns:
- the traveller data
-
getTravellerFromOrder
Method gets traveller from order for the given uid.- Parameters:
orderId- the order idtravellerUid- the uid of the traveller- Returns:
- the traveller data
-