Class PROSFlightSolutionsPriceHandler

java.lang.Object
de.hybris.platform.prosfacades.fare.search.handlers.impl.PROSFlightSolutionsPriceHandler
All Implemented Interfaces:
ShoppingFlightSearchHandler

public class PROSFlightSolutionsPriceHandler extends Object implements ShoppingFlightSearchHandler
The type Pros Flight Solution price handler updates the prices for the flight search response with the fare bundle product.
  • 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: ShoppingFlightSearchHandler
      Handle method
      Specified by:
      handle in interface ShoppingFlightSearchHandler
      Parameters:
      searchResponseMessage - the search response message
      fareShopMessage - the fare shop message
      flightSearchResponseData - the flightSearchResponseData
      transportOfferingDataMap - the transportOfferingDataMap
      flightIdCodeMap - the flightIdCodeMap
      flightSearchRequestData - 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 data
      bundleProductPriceDataList - the bundle product price data list
      travelRestrictionDataMap - 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 response
      bundleProductPriceDataList - bundle product price data list
      pricingOptionData - the pricing option data
      travelRestrictionDataMap - 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 data
      passengerPrices - 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 data
      bookingOptionData - booking option data
      flightSearchResponseData - flight search response data
      travelRestrictionDataMap - 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 data
      totalBundleProductsPrice - the total bundle products price
    • getTotalBundleProductsToAdd

      protected int getTotalBundleProductsToAdd(String category, int flightGroups, int flights)
      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 products
      bundleProductPriceDataList - list of bundle products price data
      flightSearchResponseData - flight search response data
      solutionSegmentPriceInfoData - solution segment price info
      travelRestrictionDataMap - 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

      protected PROSTravelBundleTemplateService 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

      protected TravelCommercePriceFacade getTravelCommercePriceFacade()
      Gets travel commerce price facade.
      Returns:
      the travelCommercePriceFacade
    • setTravelCommercePriceFacade

      public void setTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade)
      Sets travel commerce price facade.
      Parameters:
      travelCommercePriceFacade - the travelCommercePriceFacade to set
    • getTravelRestrictionFacade

      protected TravelRestrictionFacade getTravelRestrictionFacade()
      Get travel restriction facade
      Returns:
      the travel restriction facade
    • setTravelRestrictionFacade

      public void setTravelRestrictionFacade(TravelRestrictionFacade travelRestrictionFacade)
      Set the travel restriction facade
      Parameters:
      travelRestrictionFacade - the travel restriction facade
    • getOfferGroupToOriginDestinationMapping

      protected Map<String,String> 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