Class PROSPriceHandler
java.lang.Object
de.hybris.platform.shoppingfacades.fare.search.handlers.impl.ShoppingPriceHandler
de.hybris.platform.prosfacades.fare.search.handlers.impl.PROSPriceHandler
- All Implemented Interfaces:
ShoppingFareSearchHandler
- Direct Known Subclasses:
DealPROSPriceHandler
Extends the
ShoppingPriceHandler interface. This handler is responsible for populating the prices for scheduled route
and populates the Passenger breakdown prices on FareSelectionData-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcalculateTotals(ItineraryPricingInfoData itineraryPricingInfoData) Calculate totals.protected PriceDatacreatePriceData(de.hybris.platform.jalo.order.price.PriceInformation priceInfo) Method takes a PriceInformation object and performs a null check.protected PriceDatacreatePriceData(BigDecimal amount) Create price data price data.protected de.hybris.platform.configurablebundleservices.bundle.BundleTemplateServiceGets bundle template service.protected BigDecimalgetIncludedAncillariesTotalPrice(TravelBundleTemplateData travelBundleTemplateData) Gets included ancillaries total price.Gets origin destination ref to direction map.getPassengerRef(FareShopMessage fareShopMessage) Gets passenger ref.protected PassengerTypeFacadeGets passenger type facade.Gets pax to passenger code type mapping.protected IntegergetPricingSolutionId(Integer bundleRefID, Solution solution, PricedItineraryData pricedItinerary) Gets pricing solution id.protected de.hybris.platform.product.ProductServiceGets the product servicegetProsBundleRef(PROSSearchResponse prosSearchResponse) Gets pros bundle ref.protected PROSSearchResponseServiceGets pros search response service.protected PROSTransportOfferingFacadeGets pros transport offering facade.protected de.hybris.platform.commercefacades.storesession.StoreSessionFacadeGets store session facade.protected BigDecimalgetTotalForAncillaryProductsForMultiSector(List<TransportOfferingData> transportOfferingsData, BundleTemplateModel bundleTemplateModel, ProductData productData) Calculate the total for Ancillary products in multi sector bundle templates.protected BigDecimalgetTotalForAncillaryProductsForPointToPoint(String bundleTemplateId, ProductData productData) Calculate the total for Ancillary products in point to point bundle templates.protected BigDecimalgetTotalFromNonFareProducts(TravelBundleTemplateData bundleTemplateData) Gets total from non fare products.protected TravelCommercePriceFacadeGets travel commerce price facade.voidhandle(SearchResponseMessage searchResponseMessage, FareShopMessage fareShopMessage, FareSearchRequestData fareSearchRequestData, FareSelectionData fareSelectionData) Handle methodprotected voidpopulateBundlePriceAndTaxes(TravelBundleTemplateData travelBundleTemplateData, ItineraryPricingInfoData itineraryPricingInfoData, PricedItineraryData pricedItinerary, PROSSearchResponse searchResponseMessage, Map<String, Integer> prosBundleRef, Map<Integer, String> prosPassengerRef) Populate bundle price and taxes.protected voidpopulateIncludedAncillariesTotalPrice(PricedItineraryData pricedItinerary, TravelBundleTemplateData travelBundleTemplateData) Gets included ancillaries total price.protected voidpopulateProductPrices(List<? extends ProductData> productList, BundleTemplateModel bundleTemplate) This method populates the price information for all the fare products and ancillary products.protected voidpopulateProductPricesForOptions(List<? extends ProductData> productList, String transportOfferingCode, String sectorCode, BundleTemplateModel bundleTemplate) Populate product prices for options.protected voidpopulateProsFare(ItineraryPricingInfoData itineraryPricingInfoData, PricedItineraryData pricedItinerary, BookingSolution bookingSolution, PROSSearchResponse prosSearchResponseMessage, Map<Integer, String> prosPassengerRef) Populate pros fare.protected List<ShoppingFareData>populateProsFareDataList(PROSSearchResponse prosSearchResponseMessage, BookingSolution bookingSolution, PricedItineraryData pricedItinerary, Map<Integer, String> prosPassengerRef) Populates the prosFareDataListpopulateRBDMap(BookingCode bookingCode, PricedItineraryData pricedItinerary, Map<Integer, List<Flight>> tripSegmentToFlightsMap) Populate the RBD mapvoidsetBundleTemplateService(de.hybris.platform.configurablebundleservices.bundle.BundleTemplateService bundleTemplateService) Sets bundle template service.voidsetOriginDestinationRefToDirectionMap(Map<Integer, String> originDestinationRefToDirectionMap) Sets origin destination ref to direction map.voidsetPassengerTypeFacade(PassengerTypeFacade passengerTypeFacade) Sets passenger type facade.voidsetPaxToPassengerCodeTypeMapping(Map<String, String> paxToPassengerCodeTypeMapping) Sets pax to passenger code type mapping.voidsetProductService(de.hybris.platform.product.ProductService productService) Sets the product servicevoidsetProsSearchResponseService(PROSSearchResponseService prosSearchResponseService) Sets pros search response service.voidsetProsTransportOfferingFacade(PROSTransportOfferingFacade prosTransportOfferingFacade) Sets pros transport offering facade.voidsetStoreSessionFacade(de.hybris.platform.commercefacades.storesession.StoreSessionFacade storeSessionFacade) Sets store session facade.voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Sets travel commerce price facade.
-
Constructor Details
-
PROSPriceHandler
public PROSPriceHandler()
-
-
Method Details
-
handle
public void handle(SearchResponseMessage searchResponseMessage, FareShopMessage fareShopMessage, FareSearchRequestData fareSearchRequestData, FareSelectionData fareSelectionData) Description copied from interface:ShoppingFareSearchHandlerHandle method- Specified by:
handlein interfaceShoppingFareSearchHandler- Overrides:
handlein classShoppingPriceHandler- Parameters:
searchResponseMessage- the search response messagefareShopMessage- the fare shop messagefareSearchRequestData- the fare search request datafareSelectionData- the fare selection data
-
getPassengerRef
Gets passenger ref.- Parameters:
fareShopMessage- the one search message- Returns:
- the passenger ref
-
populateBundlePriceAndTaxes
protected void populateBundlePriceAndTaxes(TravelBundleTemplateData travelBundleTemplateData, ItineraryPricingInfoData itineraryPricingInfoData, PricedItineraryData pricedItinerary, PROSSearchResponse searchResponseMessage, Map<String, Integer> prosBundleRef, Map<Integer, String> prosPassengerRef) Populate bundle price and taxes. get(0) is used to get the first passenger ID in the segment Price since all the passenger in that list are assume to be of the same passenger type- Parameters:
travelBundleTemplateData- the travel bundle template dataitineraryPricingInfoData- the itinerary pricing info datapricedItinerary- the priced itinerarysearchResponseMessage- the search response messageprosBundleRef- the pros bundle refprosPassengerRef- the pros passenger ref
-
getIncludedAncillariesTotalPrice
protected BigDecimal getIncludedAncillariesTotalPrice(TravelBundleTemplateData travelBundleTemplateData) Gets included ancillaries total price.- Parameters:
travelBundleTemplateData- the travel bundle template data- Returns:
- the included ancillaries total price
-
getTotalFromNonFareProducts
Gets total from non fare products.- Parameters:
bundleTemplateData- the bundle template data- Returns:
- the total from non fare products
-
populateIncludedAncillariesTotalPrice
protected void populateIncludedAncillariesTotalPrice(PricedItineraryData pricedItinerary, TravelBundleTemplateData travelBundleTemplateData) Gets included ancillaries total price.- Parameters:
pricedItinerary- the priced itinerarytravelBundleTemplateData- the travel bundle template data
-
populateProductPricesForOptions
protected void populateProductPricesForOptions(List<? extends ProductData> productList, String transportOfferingCode, String sectorCode, BundleTemplateModel bundleTemplate) Populate product prices for options.- Parameters:
productList- the product listtransportOfferingCode- the transport offering codesectorCode- the sector codebundleTemplate- the bundle template
-
populateProductPrices
protected void populateProductPrices(List<? extends ProductData> productList, BundleTemplateModel bundleTemplate) This method populates the price information for all the fare products and ancillary products.- Parameters:
productList- the product listbundleTemplate- the bundle template
-
createPriceData
Method takes a PriceInformation object and performs a null check. If the object a is null then null will be returned otherwise a new PriceData object is created and returned using the PriceValue on the PriceInformation object- Parameters:
priceInfo- the price info- Returns:
- PriceData price data
-
populateProsFare
protected void populateProsFare(ItineraryPricingInfoData itineraryPricingInfoData, PricedItineraryData pricedItinerary, BookingSolution bookingSolution, PROSSearchResponse prosSearchResponseMessage, Map<Integer, String> prosPassengerRef) Populate pros fare.- Parameters:
itineraryPricingInfoData- the itinerary pricing info datapricedItinerary- the priced itinerarybookingSolution- the booking solutionprosSearchResponseMessage- the search response messageprosPassengerRef- the pros passenger ref
-
calculateTotals
Calculate totals.- Parameters:
itineraryPricingInfoData- the itinerary pricing info data
-
createPriceData
Create price data price data.- Parameters:
amount- the amount- Returns:
- the price data
-
getPricingSolutionId
protected Integer getPricingSolutionId(Integer bundleRefID, Solution solution, PricedItineraryData pricedItinerary) Gets pricing solution id.- Parameters:
bundleRefID- the bundle ref idsolution- the solutionpricedItinerary- the priced itinerary- Returns:
- the pricing solution id
-
getProsBundleRef
Gets pros bundle ref.- Parameters:
prosSearchResponse- the pros search response- Returns:
- the pricing solution id
-
getTotalForAncillaryProductsForMultiSector
protected BigDecimal getTotalForAncillaryProductsForMultiSector(List<TransportOfferingData> transportOfferingsData, BundleTemplateModel bundleTemplateModel, ProductData productData) Calculate the total for Ancillary products in multi sector bundle templates.- Parameters:
transportOfferingsData- the list of transportOfferingDatabundleTemplateModel- the bundleTemplateModelproductData- the productData- Returns:
- the total price for ancillary products.
-
getTotalForAncillaryProductsForPointToPoint
protected BigDecimal getTotalForAncillaryProductsForPointToPoint(String bundleTemplateId, ProductData productData) Calculate the total for Ancillary products in point to point bundle templates.- Parameters:
bundleTemplateId- the bundleTemplateIdproductData- the productData- Returns:
- the total price for ancillary products.
-
populateRBDMap
protected Map<String,RBD> populateRBDMap(BookingCode bookingCode, PricedItineraryData pricedItinerary, Map<Integer, List<Flight>> tripSegmentToFlightsMap) Populate the RBD map- Parameters:
bookingCode- the bookingCodepricedItinerary- the pricedItinerarytripSegmentToFlightsMap- the tripSegmentToFlightsMaps- Returns:
- the rbdMap
-
populateProsFareDataList
protected List<ShoppingFareData> populateProsFareDataList(PROSSearchResponse prosSearchResponseMessage, BookingSolution bookingSolution, PricedItineraryData pricedItinerary, Map<Integer, String> prosPassengerRef) Populates the prosFareDataList- Parameters:
prosSearchResponseMessage- the prosSearchResponseMessagebookingSolution- the bookingSolutionpricedItinerary- the pricedItineraryprosPassengerRef- the prosPassengerRef- Returns:
- the list of prosFareDataList
-
getProsSearchResponseService
Gets pros search response service.- Returns:
- the pros search response service
-
setProsSearchResponseService
Sets pros search response service.- Parameters:
prosSearchResponseService- the pros search response service
-
getPassengerTypeFacade
Gets passenger type facade.- Returns:
- the passenger type facade
-
setPassengerTypeFacade
Sets passenger type facade.- Parameters:
passengerTypeFacade- the passenger type 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
-
getTravelCommercePriceFacade
Gets travel commerce price facade.- Returns:
- the travel commerce price facade
-
setTravelCommercePriceFacade
Sets travel commerce price facade.- Parameters:
travelCommercePriceFacade- the travel commerce price facade
-
getPaxToPassengerCodeTypeMapping
Gets pax to passenger code type mapping.- Returns:
- the pax to passenger code type mapping
-
setPaxToPassengerCodeTypeMapping
Sets pax to passenger code type mapping.- Parameters:
paxToPassengerCodeTypeMapping- the pax to passenger code type mapping
-
getOriginDestinationRefToDirectionMap
Gets origin destination ref to direction map.- Returns:
- the origin destination ref to direction map
-
setOriginDestinationRefToDirectionMap
public void setOriginDestinationRefToDirectionMap(Map<Integer, String> originDestinationRefToDirectionMap) Sets origin destination ref to direction map.- Parameters:
originDestinationRefToDirectionMap- the origin destination ref to direction map
-
getProsTransportOfferingFacade
Gets pros transport offering facade.- Returns:
- the pros transport offering facade
-
setProsTransportOfferingFacade
Sets pros transport offering facade.- Parameters:
prosTransportOfferingFacade- the pros transport offering facade
-
getBundleTemplateService
protected de.hybris.platform.configurablebundleservices.bundle.BundleTemplateService getBundleTemplateService()Gets bundle template service.- Returns:
- the bundle template service
-
setBundleTemplateService
public void setBundleTemplateService(de.hybris.platform.configurablebundleservices.bundle.BundleTemplateService bundleTemplateService) Sets bundle template service.- Parameters:
bundleTemplateService- the bundle template service
-
getProductService
protected de.hybris.platform.product.ProductService getProductService()Gets the product service- Returns:
- the product service
-
setProductService
public void setProductService(de.hybris.platform.product.ProductService productService) Sets the product service- Parameters:
productService- as the product service
-