Class DefaultOfferPriceAlaCarteOffersHandler
java.lang.Object
de.hybris.platform.ndc182facades.facades.offerprice.handlers.impl.DefaultOfferPriceAlaCarteOffersHandler
- All Implemented Interfaces:
OfferPriceHandler
The ndc implementation of
OfferPriceHandler interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<ALaCarteOfferItemType>createAlaCarteOfferItems(List<NDCCarrierOfferItemData> offerItemIds, String offerID) Creates ala carte offer items list.protected List<ALaCarteOfferItemType>createAlaCarteOfferItemsFromOriginDestinationOfferInfoData(List<OriginDestinationOfferInfoData> originDestinationInfoDataList, Map<String, Integer> includedAncillaries, String offerItemID, List<NDCPassengerData> passengers, String offerID, String routeCode) This method filters the ancillaries by comparing the travellerMaxOfferQty restriction to the quantity of the ancillary that is included in the bundle.protected List<NDCPassengerData>createNdcPassengerListFromNdcOfferData(List<NDCPassengerData> passengers, List<String> paxRefIDs) Creates ndc passenger list from ndc offer data list.protected OfferRequestDatacreateOfferRequestData(NDCOfferItemBundleData ndcOfferItemBundleData, int originDestinationRefNum, List<NDCPassengerData> passengers, String routeCode) Creates an offer request data from a bundle data.protected AncillarySearchPipelineManagerGets ancillary search pipeline managers.protected de.hybris.platform.site.BaseSiteServiceGets base site service.protected de.hybris.platform.servicelayer.config.ConfigurationServiceGets configuration service.protected de.hybris.platform.servicelayer.keygenerator.KeyGeneratorGets key generator.protected NDCOfferFacadeGets ndc offer facade.protected StringGets product catalog id from baseSiteService.protected TransportOfferingFacadeGets transport offering facade.protected TravelBundleTemplateServiceGets travel bundle template service.protected TravelRouteFacadeGets travel route facade.voidhandle(NDCCarrierOfferData ndcOfferData, IATAOfferPriceRS offerPriceRS) This handler populates the list of alaCarteOffer for each ndcOfferData.voidsetAncillarySearchPipelineManager(AncillarySearchPipelineManager ancillarySearchPipelineManager) Sets ancillary search pipeline managers.voidsetBaseSiteService(de.hybris.platform.site.BaseSiteService baseSiteService) Sets base site service.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.voidsetKeyGenerator(de.hybris.platform.servicelayer.keygenerator.KeyGenerator keyGenerator) Sets key generator.voidsetNdcOfferFacade(NDCOfferFacade ndcOfferFacade) Sets ndc offer facade.voidsetTransportOfferingFacade(TransportOfferingFacade transportOfferingFacade) Sets transport offering facade.voidsetTravelBundleTemplateService(TravelBundleTemplateService travelBundleTemplateService) Sets travel bundle template service.voidsetTravelRouteFacade(TravelRouteFacade travelRouteFacade) Sets travel route facade.protected voidstoreAlaCarteCacheData(OfferType alaCarteOffer, NDCCarrierOfferData ndcOfferData) Stores ala carte offer data into the cache.
-
Constructor Details
-
DefaultOfferPriceAlaCarteOffersHandler
public DefaultOfferPriceAlaCarteOffersHandler()
-
-
Method Details
-
handle
public void handle(NDCCarrierOfferData ndcOfferData, IATAOfferPriceRS offerPriceRS) throws NDCException This handler populates the list of alaCarteOffer for each ndcOfferData. An alaCarteOffer contains the list of available ancillaries for each offer listed in the offerPriceRQ.- Specified by:
handlein interfaceOfferPriceHandler- Parameters:
ndcOfferData- the ndcOffersDataofferPriceRS- the offerPriceRS- Throws:
NDCException
-
createAlaCarteOfferItems
protected List<ALaCarteOfferItemType> createAlaCarteOfferItems(List<NDCCarrierOfferItemData> offerItemIds, String offerID) throws NDCException Creates ala carte offer items list. For each bundle in the offeritem, creates the offerRequestData and retrieves all the available ancillaries and all the ones which are already included in the bundle template. For the ones that are already included, checks the quantity and compares it with its travel restriction on the maximum quantity. If no the quantity is equal to the maximum allowed quantity, then the ancillary won't be listed in the alacarteoffer.- Parameters:
offerItemIds- the offer item idsofferID- the offerID- Returns:
- the list
- Throws:
NDCException
-
createAlaCarteOfferItemsFromOriginDestinationOfferInfoData
protected List<ALaCarteOfferItemType> createAlaCarteOfferItemsFromOriginDestinationOfferInfoData(List<OriginDestinationOfferInfoData> originDestinationInfoDataList, Map<String, Integer> includedAncillaries, String offerItemID, List<NDCPassengerData> passengers, String offerID, String routeCode) This method filters the ancillaries by comparing the travellerMaxOfferQty restriction to the quantity of the ancillary that is included in the bundle.- Parameters:
originDestinationInfoDataList- the origin destination info data listincludedAncillaries- the included ancillariesofferItemID- the offer item idpassengers- the passengersofferID- the offerIDrouteCode- the routeCode- Returns:
- the list
-
createOfferRequestData
protected OfferRequestData createOfferRequestData(NDCOfferItemBundleData ndcOfferItemBundleData, int originDestinationRefNum, List<NDCPassengerData> passengers, String routeCode) Creates an offer request data from a bundle data. In the offerRequestData we will have only one itinerary at time, since the offeritem corresponds either to an outbound or an inbound, not together.- Parameters:
ndcOfferItemBundleData- the ndc offer item bundle dataoriginDestinationRefNum- the origin destination ref numpassengers- the passengersrouteCode- the route code- Returns:
- the offer request data
-
storeAlaCarteCacheData
protected void storeAlaCarteCacheData(OfferType alaCarteOffer, NDCCarrierOfferData ndcOfferData) throws NDCException Stores ala carte offer data into the cache.- Parameters:
alaCarteOffer- the ala carte offerndcOfferData- the ndc offer data- Throws:
NDCException- the ndc exception
-
createNdcPassengerListFromNdcOfferData
protected List<NDCPassengerData> createNdcPassengerListFromNdcOfferData(List<NDCPassengerData> passengers, List<String> paxRefIDs) throws NDCException Creates ndc passenger list from ndc offer data list.- Parameters:
passengers- the passengerspaxRefIDs- the pax ref i ds- Returns:
- the list
- Throws:
NDCException
-
getProductCatalogIdFromBaseSiteService
Gets product catalog id from baseSiteService.- Returns:
- the product catalog
- Throws:
NDCException
-
getTransportOfferingFacade
Gets transport offering facade.- Returns:
- the transport offering facade
-
setTransportOfferingFacade
Sets transport offering facade.- Parameters:
transportOfferingFacade- the transport offering facade
-
getTravelRouteFacade
Gets travel route facade.- Returns:
- the travel route facade
-
setTravelRouteFacade
Sets travel route facade.- Parameters:
travelRouteFacade- the travel route facade
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()Gets configuration service.- Returns:
- the configuration service
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.- Parameters:
configurationService- the configuration service
-
getAncillarySearchPipelineManager
Gets ancillary search pipeline managers.- Returns:
- the ancillary search pipeline managers
-
setAncillarySearchPipelineManager
public void setAncillarySearchPipelineManager(AncillarySearchPipelineManager ancillarySearchPipelineManager) Sets ancillary search pipeline managers.- Parameters:
ancillarySearchPipelineManager- the ancillary search pipeline managers
-
getTravelBundleTemplateService
Gets travel bundle template service.- Returns:
- the travel bundle template service
-
setTravelBundleTemplateService
Sets travel bundle template service.- Parameters:
travelBundleTemplateService- the travel bundle template service
-
getBaseSiteService
protected de.hybris.platform.site.BaseSiteService getBaseSiteService()Gets base site service.- Returns:
- the base site service
-
setBaseSiteService
public void setBaseSiteService(de.hybris.platform.site.BaseSiteService baseSiteService) Sets base site service.- Parameters:
baseSiteService- the base site service
-
getKeyGenerator
protected de.hybris.platform.servicelayer.keygenerator.KeyGenerator getKeyGenerator()Gets key generator.- Returns:
- the key generator
-
setKeyGenerator
public void setKeyGenerator(de.hybris.platform.servicelayer.keygenerator.KeyGenerator keyGenerator) Sets key generator.- Parameters:
keyGenerator- the key generator
-
getNdcOfferFacade
Gets ndc offer facade.- Returns:
- the ndc offer facade
-
setNdcOfferFacade
Sets ndc offer facade.- Parameters:
ndcOfferFacade- the ndc offer facade
-