Class PROSFlightSolutionsPriceHandler
java.lang.Object
de.hybris.platform.prosfacades.fare.search.handlers.impl.PROSFlightSolutionsPriceHandler
- All Implemented Interfaces:
ShoppingFlightSearchHandler
The type Pros Flight Solution price handler updates the prices for the flight search response with the fare bundle product.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<BundleProductPriceData>getBundleProductPriceData(FlightSearchResponseData flightSearchResponseData) Get product price based on the change product price bundle rulesprotected BigDecimalgetBundleProductPriceForSegment(List<FareBundleProductData> fareBundleProducts, List<BundleProductPriceData> bundleProductPriceDataList, FlightSearchResponseData flightSearchResponseData, SolutionSegmentPriceInfoData solutionSegmentPriceInfoData, Map<String, TravelRestrictionData> travelRestrictionDataMap) Get the Bundle Product priceGet offer group to origin destination mappingprotected PROSTravelBundleTemplateServiceGet the PROS Travel Bundle Template Serviceprotected intgetTotalBundleProductsToAdd(String category, int flightGroups, int flights) Fetch the iterations based on the product category typeprotected TravelCommercePriceFacadeGets travel commerce price facade.protected TravelRestrictionFacadeGet travel restriction facadeprotected Map<String,TravelRestrictionData> getTravelRestrictionsForBundleProducts(List<BasicProductData> fareBundleProducts) Get the travel restrictions for the fare bundle productsvoidhandle(SearchResponseMessage searchResponseMessage, FareShopMessage fareShopMessage, FlightSearchResponseData flightSearchResponseData, Map<String, TransportOfferingData> transportOfferingDataMap, Map<Integer, String> flightIdCodeMap, FlightSearchRequestData flightSearchRequestData) Handle methodprotected voiditerateBookingOptionsForPricing(FlightSearchResponseData flightSearchResponseData, List<BundleProductPriceData> bundleProductPriceDataList, PricingOptionData pricingOptionData, Map<String, TravelRestrictionData> travelRestrictionDataMap) Iterate booking option for pricingvoidsetOfferGroupToOriginDestinationMapping(Map<String, String> offerGroupToOriginDestinationMapping) Set offer group to origin destination mappingvoidsetProsTravelBundleTemplateService(PROSTravelBundleTemplateService prosTravelBundleTemplateService) Set PROS Travel Bundle Template ServicevoidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Sets travel commerce price facade.voidsetTravelRestrictionFacade(TravelRestrictionFacade travelRestrictionFacade) Set the travel restriction facadeprotected voidupdatePassengerPriceBreakdown(BookingOptionData bookingOptionData, Map<Integer, BigDecimal> passengerPrices) Update the passenger price breakdownprotected voidupdateProductPricesBasedOnPricingRules(FlightSearchResponseData flightSearchResponseData, List<BundleProductPriceData> bundleProductPriceDataList, Map<String, TravelRestrictionData> travelRestrictionDataMap) Update the prices of the solution based on the pricing rulesprotected Map<Integer,BigDecimal> updateSegmentPrice(List<BundleProductPriceData> bundleProductPriceDataList, BookingOptionData bookingOptionData, FlightSearchResponseData flightSearchResponseData, Map<String, TravelRestrictionData> travelRestrictionDataMap) Update the segment priceprotected voidupdateTotalPrice(BookingOptionData bookingOptionData, BigDecimal totalBundleProductsPrice) Update the total price
-
Constructor Details
-
PROSFlightSolutionsPriceHandler
public PROSFlightSolutionsPriceHandler()
-
-
Method Details
-
handle
public void handle(SearchResponseMessage searchResponseMessage, FareShopMessage fareShopMessage, FlightSearchResponseData flightSearchResponseData, Map<String, TransportOfferingData> transportOfferingDataMap, Map<Integer, String> flightIdCodeMap, FlightSearchRequestData flightSearchRequestData) Description copied from interface:ShoppingFlightSearchHandlerHandle method- Specified by:
handlein interfaceShoppingFlightSearchHandler- Parameters:
searchResponseMessage- the search response messagefareShopMessage- the fare shop messageflightSearchResponseData- the flightSearchResponseDatatransportOfferingDataMap- the transportOfferingDataMapflightIdCodeMap- the flightIdCodeMapflightSearchRequestData- the flight search request data
-
getTravelRestrictionsForBundleProducts
protected Map<String,TravelRestrictionData> getTravelRestrictionsForBundleProducts(List<BasicProductData> fareBundleProducts) Get the travel restrictions for the fare bundle products- Parameters:
fareBundleProducts- the fare bundle products- Returns:
- list of travel restriction data
-
updateProductPricesBasedOnPricingRules
protected void updateProductPricesBasedOnPricingRules(FlightSearchResponseData flightSearchResponseData, List<BundleProductPriceData> bundleProductPriceDataList, Map<String, TravelRestrictionData> travelRestrictionDataMap) Update the prices of the solution based on the pricing rules- Parameters:
flightSearchResponseData- the flight search response databundleProductPriceDataList- the bundle product price data listtravelRestrictionDataMap- the travel restriction data map
-
iterateBookingOptionsForPricing
protected void iterateBookingOptionsForPricing(FlightSearchResponseData flightSearchResponseData, List<BundleProductPriceData> bundleProductPriceDataList, PricingOptionData pricingOptionData, Map<String, TravelRestrictionData> travelRestrictionDataMap) Iterate booking option for pricing- Parameters:
flightSearchResponseData- fare search responsebundleProductPriceDataList- bundle product price data listpricingOptionData- the pricing option datatravelRestrictionDataMap- the travel restriction data map
-
updatePassengerPriceBreakdown
protected void updatePassengerPriceBreakdown(BookingOptionData bookingOptionData, Map<Integer, BigDecimal> passengerPrices) Update the passenger price breakdown- Parameters:
bookingOptionData- the booking option datapassengerPrices- the passenger prices
-
updateSegmentPrice
protected Map<Integer,BigDecimal> updateSegmentPrice(List<BundleProductPriceData> bundleProductPriceDataList, BookingOptionData bookingOptionData, FlightSearchResponseData flightSearchResponseData, Map<String, TravelRestrictionData> travelRestrictionDataMap) Update the segment price- Parameters:
bundleProductPriceDataList- bundle product price databookingOptionData- booking option dataflightSearchResponseData- flight search response datatravelRestrictionDataMap- travel restriction data map- Returns:
- price of bundle products per passenger
-
updateTotalPrice
protected void updateTotalPrice(BookingOptionData bookingOptionData, BigDecimal totalBundleProductsPrice) Update the total price- Parameters:
bookingOptionData- the booking option datatotalBundleProductsPrice- the total bundle products price
-
getTotalBundleProductsToAdd
Fetch the iterations based on the product category type- Parameters:
category-flightGroups-flights-- Returns:
-
getBundleProductPriceForSegment
protected BigDecimal getBundleProductPriceForSegment(List<FareBundleProductData> fareBundleProducts, List<BundleProductPriceData> bundleProductPriceDataList, FlightSearchResponseData flightSearchResponseData, SolutionSegmentPriceInfoData solutionSegmentPriceInfoData, Map<String, TravelRestrictionData> travelRestrictionDataMap) Get the Bundle Product price- Parameters:
fareBundleProducts- fare bundle productsbundleProductPriceDataList- list of bundle products price dataflightSearchResponseData- flight search response datasolutionSegmentPriceInfoData- solution segment price infotravelRestrictionDataMap- travel restriction data map- Returns:
- the bundle product price
-
getBundleProductPriceData
protected List<BundleProductPriceData> getBundleProductPriceData(FlightSearchResponseData flightSearchResponseData) Get product price based on the change product price bundle rules- Parameters:
flightSearchResponseData- flight search response- Returns:
- bundleProductPriceDataList bundle product price data list
-
getProsTravelBundleTemplateService
Get the PROS Travel Bundle Template Service- Returns:
- pros travel bundle template service
-
setProsTravelBundleTemplateService
public void setProsTravelBundleTemplateService(PROSTravelBundleTemplateService prosTravelBundleTemplateService) Set PROS Travel Bundle Template Service- Parameters:
prosTravelBundleTemplateService- the pros travel bundle template service
-
getTravelCommercePriceFacade
Gets travel commerce price facade.- Returns:
- the travelCommercePriceFacade
-
setTravelCommercePriceFacade
Sets travel commerce price facade.- Parameters:
travelCommercePriceFacade- the travelCommercePriceFacade to set
-
getTravelRestrictionFacade
Get travel restriction facade- Returns:
- the travel restriction facade
-
setTravelRestrictionFacade
Set the travel restriction facade- Parameters:
travelRestrictionFacade- the travel restriction facade
-
getOfferGroupToOriginDestinationMapping
Get offer group to origin destination mapping- Returns:
- offer group to origin destination mapping
-
setOfferGroupToOriginDestinationMapping
public void setOfferGroupToOriginDestinationMapping(Map<String, String> offerGroupToOriginDestinationMapping) Set offer group to origin destination mapping- Parameters:
offerGroupToOriginDestinationMapping- the offer group to origin destination mapping
-