Class ServiceListAlaCarteOffersHandler
java.lang.Object
de.hybris.platform.ndc182facades.facades.servicelist.handlers.impl.AbstractAlaCartOffersHandler
de.hybris.platform.ndc182facades.facades.servicelist.handlers.impl.ServiceListAlaCarteOffersHandler
- All Implemented Interfaces:
ServiceListHandler<NDCCarrierOfferData>
public class ServiceListAlaCarteOffersHandler
extends AbstractAlaCartOffersHandler
implements ServiceListHandler<NDCCarrierOfferData>
The ndc implementation of
ServiceListHandler interface to populate the alacarte offers fields.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<ALaCarteOfferItemType>createAlaCarteOfferItems(List<NDCCarrierOfferItemData> offerItemIds) Creates ala carte offer items list.protected List<ALaCarteOfferItemType>createAlaCarteOfferItemsFromOriginDestinationOfferInfoData(List<OriginDestinationOfferInfoData> originDestinationInfoDataList, Map<String, Integer> includedAncillaries, List<NDCPassengerData> passengers) This method filters the ancillaries by comparing the travellerMaxOfferQty restriction to the quantity of the ancillary that is included in the bundle.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 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, IATAServiceListRS serviceListRS, List<AbstractOrderEntryModel> selectedItems) Handles data from ndcOfferData to serviceListRS.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.voidsetTransportOfferingFacade(TransportOfferingFacade transportOfferingFacade) Sets transport offering facade.voidsetTravelBundleTemplateService(TravelBundleTemplateService travelBundleTemplateService) Sets travel bundle template service.voidsetTravelRouteFacade(TravelRouteFacade travelRouteFacade) Sets travel route facade.Methods inherited from class de.hybris.platform.ndc182facades.facades.servicelist.handlers.impl.AbstractAlaCartOffersHandler
createNdcPassengerList, getNdcOfferFacade, setNdcOfferFacade, storeAlaCarteCacheData
-
Constructor Details
-
ServiceListAlaCarteOffersHandler
public ServiceListAlaCarteOffersHandler()
-
-
Method Details
-
handle
public void handle(NDCCarrierOfferData ndcOfferData, IATAServiceListRS serviceListRS, List<AbstractOrderEntryModel> selectedItems) throws NDCException Description copied from interface:ServiceListHandlerHandles data from ndcOfferData to serviceListRS.- Specified by:
handlein interfaceServiceListHandler<NDCCarrierOfferData>- Parameters:
ndcOfferData- the sourceserviceListRS- the serviceListRSselectedItems- the selectedEntries- Throws:
NDCException
-
createAlaCarteOfferItems
protected List<ALaCarteOfferItemType> createAlaCarteOfferItems(List<NDCCarrierOfferItemData> offerItemIds) 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 ids- Returns:
- the list
- Throws:
NDCException
-
createAlaCarteOfferItemsFromOriginDestinationOfferInfoData
protected List<ALaCarteOfferItemType> createAlaCarteOfferItemsFromOriginDestinationOfferInfoData(List<OriginDestinationOfferInfoData> originDestinationInfoDataList, Map<String, Integer> includedAncillaries, List<NDCPassengerData> passengers) 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 ancillariespassengers- the passengers- 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
-
getProductCatalogIdFromBaseSite
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
-