Class TravellerStatusInfoHandler
java.lang.Object
de.hybris.platform.travelfacades.ancillary.search.handlers.impl.TravellerStatusInfoHandler
- All Implemented Interfaces:
AncillarySearchHandler
Handler to populate travellerStatusInfo for each traveller in the ItineraryData of the OfferResponseData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.store.services.BaseStoreServiceprotected ConsignmentModelgetConsignment(String travellerUid, String transportOfferingCode, OrderModel orderModel) The method returns the consignment corresponding to the traveller and the transportOfferingprotected de.hybris.platform.commerceservices.customer.CustomerAccountServiceprotected TravelCartFacadeprotected TravellerStatusgetTravellerStatus(ConsignmentModel consignment) The method evaluate and returns the TravellerStatus based on a specific consignment.protected Map<String,TravellerStatus> getTravellerStatusMap(String travellerUid, List<String> transportOfferingCodes, OrderModel orderModel) The method creates and returns the travellerStatusMap for a specific traveller, where the key is the transportOfferingCode and the value is the TravellerStatus for that transportOffering.voidhandle(OfferRequestData offerRequestData, OfferResponseData offerResponseData) Handle method.voidsetBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService) voidsetCustomerAccountService(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService) voidsetTravelCartFacade(TravelCartFacade travelCartFacade)
-
Constructor Details
-
TravellerStatusInfoHandler
public TravellerStatusInfoHandler()
-
-
Method Details
-
handle
Description copied from interface:AncillarySearchHandlerHandle method.- Specified by:
handlein interfaceAncillarySearchHandler- Parameters:
offerRequestData- the offer request dataofferResponseData- the offer response data
-
getTravellerStatusMap
protected Map<String,TravellerStatus> getTravellerStatusMap(String travellerUid, List<String> transportOfferingCodes, OrderModel orderModel) The method creates and returns the travellerStatusMap for a specific traveller, where the key is the transportOfferingCode and the value is the TravellerStatus for that transportOffering.- Parameters:
travellerUid- as the Uid of the traveller to use to create the travellerStatusMaptransportOfferingCodes- as the list of transportOffering codes to be used to create the travellerStatusMaporderModel- as the orderModel with the consignments that have to be checked- Returns:
- a Map<String, TravellerStatus>, where the key is the transportOfferingCode and the value is the TravellerStatus for that transportOffering.
-
getConsignment
protected ConsignmentModel getConsignment(String travellerUid, String transportOfferingCode, OrderModel orderModel) The method returns the consignment corresponding to the traveller and the transportOffering- Parameters:
travellerUid- as the Uid of the travellertransportOfferingCode- as the code of the transportOfferingorderModel- as the orderModel- Returns:
- the consignmentModel of the orderModel, corresponding to the specific traveller and the transportOffering
-
getTravellerStatus
The method evaluate and returns the TravellerStatus based on a specific consignment.- Parameters:
consignment- as the consignmentModel used to get the TravellerStatus- Returns:
- the TravellerStatus that corresponds to the status of the consignment. If the consignment status doesn't correspond to any TravellerStatus, the default return value is TravellerStatus.READY.
-
getTravelCartFacade
- Returns:
- the travelCartFacade
-
setTravelCartFacade
- Parameters:
travelCartFacade- the travelCartFacade to set
-
getBaseStoreService
protected de.hybris.platform.store.services.BaseStoreService getBaseStoreService()- Returns:
- the baseStoreService
-
setBaseStoreService
public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService) - Parameters:
baseStoreService- the baseStoreService to set
-
getCustomerAccountService
protected de.hybris.platform.commerceservices.customer.CustomerAccountService getCustomerAccountService()- Returns:
- the customerAccountService
-
setCustomerAccountService
public void setCustomerAccountService(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService) - Parameters:
customerAccountService- the customerAccountService to set
-