Class PROSCarrierOfferPriceHandler
java.lang.Object
de.hybris.platform.ndc182shoppingfacades.facades.offerprice.handlers.impl.CarrierOfferPriceHandler
de.hybris.platform.ndc182prosfacades.facades.offerprice.handlers.impl.PROSCarrierOfferPriceHandler
- All Implemented Interfaces:
OfferPriceHandler
Populates offer price response from IntelliPricerResponse.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PriceTypecalculatePriceForOfferItem(NDCCarrierOfferItemData ndcOfferItemData, Map<NDCCarrierOfferItemData, SegmentPrice> offerItemSegmentPrice, BigDecimal bundleProductPrice) Calculates the price for specific NDC offer item.protected FareDetailTypecreateFareDetail(NDCCarrierOfferItemData ndcOfferItemData, Map<String, BundleTemplateModel> routeBundle, PriceType priceType) Creates the fare detail type.protected JourneyOverviewTypecreateJourneyOverview(DataListsType dataLists, Map<String, BundleTemplateModel> routeBundle) Creates the journey overview.protected ServiceDefinitionListTypecreateServiceDefinitions(Collection<ProductModel> products) Creates the service definitions.protected List<Service1Type>createServices(NDCCarrierOfferItemData ndcOfferItemData, Map<String, BundleTemplateModel> routeBundle, Map<String, ProductModel> servicesMapping) Creates services.protected List<Service1Type>createServicesFromProducts(List<ProductModel> products, List<NDCPassengerData> ndcPassengers, List<String> transportOfferingCodes) Creates services from the products.protected Map<String,BundleTemplateModel> getAncillaryBundleMapping(Set<String> fareProductCodes) Get ancillary bundle for for fare code mappingprotected de.hybris.platform.site.BaseSiteServiceGets base site service.protected Map<String,List<BundleProductPriceData>> getBundleProductPriceData(Map<String, BundleTemplateModel> ancillaryBundleMapping) Get product price based on the change product price bundle rulesprotected BigDecimalgetBundleProductPriceForOfferItem(NDCCarrierOfferItemData ndcOfferItemData, List<BundleProductPriceData> products) Calculates bundle product price for NDC offer itemprotected de.hybris.platform.servicelayer.config.ConfigurationServiceGets configuration service.protected FarePriceFacadeGets fare price service.Get offer group to origin destination mappingprotected Map<NDCCarrierOfferItemData,FlightGroup> getOfferItemSegmentMapping(NDCCarrierOfferData ndcOfferData, PROSSearchResponse prosSearchResponse) Creates the mapping between NDC offer item and segment price from PROS.protected Map<NDCCarrierOfferItemData,SegmentPrice> getOfferItemSegmentPriceMapping(Map<NDCCarrierOfferItemData, FlightGroup> offerItemSegment, PROSSearchResponse prosSearchResponse) Creates the mapping between NDC offer item and segment price from PROS.protected de.hybris.platform.product.ProductServiceGets product service.protected Map<String,BundleTemplateModel> getRouteBundleMapping(Map<NDCCarrierOfferItemData, FlightGroup> offerItemSegment, PROSSearchResponse prosSearchResponse) Creates the mapping between route and bundle template for this route.protected de.hybris.platform.servicelayer.dto.converter.Converter<NDCCarrierOfferData,AddSolutionRequestData> Gets solution request converter.protected de.hybris.platform.commercefacades.storesession.StoreSessionFacadeGets store session facade.protected TransportFacilityFacadeGets transport facility facade.protected PROSTravelBundleTemplateServiceGets travel bundle template service.protected TravelCommercePriceFacadeGets travel commerce price facade.protected TravelRestrictionFacadeGet travel restriction facadevoidhandle(NDCCarrierOfferData ndcOfferData, IATAOfferPriceRS offerPriceRS) Handles data from ndcOfferData to offerPriceRS.protected voidpopulateBaggageAllowances(PROSSearchResponse prosSearchResponse, ResponseType responseType) Populates baggage allowances from PROS response.protected voidpopulatePriceClass(Map<String, BundleTemplateModel> routeBundle, ResponseType responseType) Populates price class from NDC offer.protected voidpopulatePricedOffer(NDCCarrierOfferData ndcOfferData, Map<String, BundleTemplateModel> routeBundle, Map<NDCCarrierOfferItemData, SegmentPrice> offerItemSegmentPrice, ResponseType responseType) Populates priced offer from NDC offer.voidsetBaseSiteService(de.hybris.platform.site.BaseSiteService baseSiteService) Sets base site service.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.voidsetFarePriceFacade(FarePriceFacade farePriceFacade) Sets fare price service.voidsetOfferGroupToOriginDestinationMapping(Map<String, String> offerGroupToOriginDestinationMapping) Set offer group to origin destination mappingvoidsetProductService(de.hybris.platform.product.ProductService productService) Sets product service.voidsetSolutionRequestConverter(de.hybris.platform.servicelayer.dto.converter.Converter<NDCCarrierOfferData, AddSolutionRequestData> solutionRequestConverter) Sets solution request converter.voidsetStoreSessionFacade(de.hybris.platform.commercefacades.storesession.StoreSessionFacade storeSessionFacade) Sets store session facade.voidsetTransportFacilityFacade(TransportFacilityFacade transportFacilityFacade) Sets transport facility facade.voidsetTravelBundleTemplateService(PROSTravelBundleTemplateService travelBundleTemplateService) Sets travel bundle template service.voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Sets travel commerce price facade.voidsetTravelRestrictionFacade(TravelRestrictionFacade travelRestrictionFacade) Set the travel restriction facade
-
Constructor Details
-
PROSCarrierOfferPriceHandler
public PROSCarrierOfferPriceHandler()
-
-
Method Details
-
handle
public void handle(NDCCarrierOfferData ndcOfferData, IATAOfferPriceRS offerPriceRS) throws NDCException Description copied from interface:OfferPriceHandlerHandles data from ndcOfferData to offerPriceRS.- Specified by:
handlein interfaceOfferPriceHandler- Specified by:
handlein classCarrierOfferPriceHandler- Parameters:
ndcOfferData- the ndcOffersDataofferPriceRS- the offerPriceRS- Throws:
NDCException
-
getOfferItemSegmentMapping
protected Map<NDCCarrierOfferItemData,FlightGroup> getOfferItemSegmentMapping(NDCCarrierOfferData ndcOfferData, PROSSearchResponse prosSearchResponse) Creates the mapping between NDC offer item and segment price from PROS.- Parameters:
ndcOfferData- the NDC offerprosSearchResponse- the pros response- Returns:
- the mapping between NDC offer item and segment price from PROS
-
getRouteBundleMapping
protected Map<String,BundleTemplateModel> getRouteBundleMapping(Map<NDCCarrierOfferItemData, FlightGroup> offerItemSegment, PROSSearchResponse prosSearchResponse) throws NDCExceptionCreates the mapping between route and bundle template for this route.- Parameters:
offerItemSegment- the mapping between NDC offer item and segment price from PROSprosSearchResponse- the pros response- Returns:
- the mapping between route and bundle template for this route
- Throws:
NDCException
-
getOfferItemSegmentPriceMapping
protected Map<NDCCarrierOfferItemData,SegmentPrice> getOfferItemSegmentPriceMapping(Map<NDCCarrierOfferItemData, FlightGroup> offerItemSegment, PROSSearchResponse prosSearchResponse) Creates the mapping between NDC offer item and segment price from PROS.- Parameters:
offerItemSegment- the mapping between NDC offer item and segment price from PROSprosSearchResponse- the pros response- Returns:
- the mapping between NDC offer item and segment price from PROS
-
populateBaggageAllowances
protected void populateBaggageAllowances(PROSSearchResponse prosSearchResponse, ResponseType responseType) Populates baggage allowances from PROS response.- Parameters:
prosSearchResponse- the pros responseresponseType- the response type
-
populatePriceClass
protected void populatePriceClass(Map<String, BundleTemplateModel> routeBundle, ResponseType responseType) Populates price class from NDC offer.- Parameters:
routeBundle- the mapping between route and bundle template for this routeresponseType- the response type
-
populatePricedOffer
protected void populatePricedOffer(NDCCarrierOfferData ndcOfferData, Map<String, BundleTemplateModel> routeBundle, Map<NDCCarrierOfferItemData, throws NDCExceptionSegmentPrice> offerItemSegmentPrice, ResponseType responseType) Populates priced offer from NDC offer.- Parameters:
ndcOfferData- the NDC offerrouteBundle- the mapping between route and bundle template for this routeofferItemSegmentPrice- the mapping between NDC offer item and segment price from PROSresponseType- the response type- Throws:
NDCException
-
getAncillaryBundleMapping
protected Map<String,BundleTemplateModel> getAncillaryBundleMapping(Set<String> fareProductCodes) throws NDCException Get ancillary bundle for for fare code mapping- Parameters:
fareProductCodes- fare product codes- Returns:
- ancillary bundle for for fare code mapping
- Throws:
NDCException
-
getBundleProductPriceData
protected Map<String,List<BundleProductPriceData>> getBundleProductPriceData(Map<String, BundleTemplateModel> ancillaryBundleMapping) Get product price based on the change product price bundle rules- Parameters:
ancillaryBundleMapping- the ancillary bundle mapping- Returns:
- bundle product price data list
-
getBundleProductPriceForOfferItem
protected BigDecimal getBundleProductPriceForOfferItem(NDCCarrierOfferItemData ndcOfferItemData, List<BundleProductPriceData> products) Calculates bundle product price for NDC offer item- Parameters:
ndcOfferItemData- the ndc offer itemproducts- the list of bundle products- Returns:
- bundle product price for NDC offer item
-
createServices
protected List<Service1Type> createServices(NDCCarrierOfferItemData ndcOfferItemData, Map<String, BundleTemplateModel> routeBundle, Map<String, ProductModel> servicesMapping) Creates services.- Parameters:
ndcOfferItemData- the ndc offer item datarouteBundle- the mapping between route and bundle template for this route- Returns:
- the list of services
-
createServicesFromProducts
protected List<Service1Type> createServicesFromProducts(List<ProductModel> products, List<NDCPassengerData> ndcPassengers, List<String> transportOfferingCodes) Creates services from the products.- Parameters:
products- the productsndcPassengers- the ndc passengerstransportOfferingCodes- the transport offering codes- Returns:
- the list
-
calculatePriceForOfferItem
protected PriceType calculatePriceForOfferItem(NDCCarrierOfferItemData ndcOfferItemData, Map<NDCCarrierOfferItemData, SegmentPrice> offerItemSegmentPrice, BigDecimal bundleProductPrice) Calculates the price for specific NDC offer item.- Parameters:
ndcOfferItemData- the NDC offer itemofferItemSegmentPrice- the mapping between NDC offer item and segment price from PROS- Returns:
- the price for NDC offer item
-
createJourneyOverview
protected JourneyOverviewType createJourneyOverview(DataListsType dataLists, Map<String, BundleTemplateModel> routeBundle) Creates the journey overview.- Parameters:
dataLists- the ndc data listsrouteBundle- the mapping between route and bundle template for this route- Returns:
- the journey overview type
-
createServiceDefinitions
Creates the service definitions.- Parameters:
products- the products- Returns:
- the service definitions
-
createFareDetail
protected FareDetailType createFareDetail(NDCCarrierOfferItemData ndcOfferItemData, Map<String, BundleTemplateModel> routeBundle, PriceType priceType) Creates the fare detail type.- Parameters:
ndcOfferItemData- the NDC offer itemrouteBundle- the mapping between route and bundle template for this route- Returns:
- the the fare detail type
-
getTravelBundleTemplateService
Gets travel bundle template service.- Returns:
- the travel bundle template service
-
setTravelBundleTemplateService
public void setTravelBundleTemplateService(PROSTravelBundleTemplateService travelBundleTemplateService) Sets travel bundle template service.- Parameters:
travelBundleTemplateService- the travel bundle template service
-
getTravelRestrictionFacade
Get travel restriction facade- Returns:
- the travel restriction facade
-
setTravelRestrictionFacade
Set the travel restriction facade- Parameters:
travelRestrictionFacade- the travel restriction facade
-
getTravelCommercePriceFacade
Gets travel commerce price facade.- Returns:
- the travelCommercePriceFacade
-
setTravelCommercePriceFacade
Sets travel commerce price facade.- Parameters:
travelCommercePriceFacade- the travelCommercePriceFacade to set
-
getProductService
protected de.hybris.platform.product.ProductService getProductService()Gets product service.- Returns:
- the productService
-
setProductService
public void setProductService(de.hybris.platform.product.ProductService productService) Sets product service.- Parameters:
productService- the productService to set
-
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
-
getFarePriceFacade
Gets fare price service.- Returns:
- the fare price service
-
setFarePriceFacade
Sets fare price service.- Parameters:
farePriceFacade- the fare price service
-
getTransportFacilityFacade
Gets transport facility facade.- Returns:
- the transport facility facade
-
setTransportFacilityFacade
Sets transport facility facade.- Parameters:
transportFacilityFacade- the transport facility facade
-
getStoreSessionFacade
protected de.hybris.platform.commercefacades.storesession.StoreSessionFacade getStoreSessionFacade()Gets store session facade.- Returns:
- the store session facade
-
setStoreSessionFacade
public void setStoreSessionFacade(de.hybris.platform.commercefacades.storesession.StoreSessionFacade storeSessionFacade) Sets store session facade.- Parameters:
storeSessionFacade- the store session 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
-
getSolutionRequestConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<NDCCarrierOfferData,AddSolutionRequestData> getSolutionRequestConverter()Gets solution request converter.- Returns:
- the solution request converter
-
setSolutionRequestConverter
public void setSolutionRequestConverter(de.hybris.platform.servicelayer.dto.converter.Converter<NDCCarrierOfferData, AddSolutionRequestData> solutionRequestConverter) Sets solution request converter.- Parameters:
solutionRequestConverter- the solution request converter
-
getOfferGroupToOriginDestinationMapping
Get offer group to origin destination mapping- Returns:
-
setOfferGroupToOriginDestinationMapping
public void setOfferGroupToOriginDestinationMapping(Map<String, String> offerGroupToOriginDestinationMapping) Set offer group to origin destination mapping- Parameters:
offerGroupToOriginDestinationMapping-
-