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

public class PROSPriceHandler extends ShoppingPriceHandler
Extends the ShoppingPriceHandler interface. This handler is responsible for populating the prices for scheduled route and populates the Passenger breakdown prices on FareSelectionData
  • Constructor Details

    • PROSPriceHandler

      public PROSPriceHandler()
  • Method Details

    • handle

      public void handle(SearchResponseMessage searchResponseMessage, FareShopMessage fareShopMessage, FareSearchRequestData fareSearchRequestData, FareSelectionData fareSelectionData)
      Description copied from interface: ShoppingFareSearchHandler
      Handle method
      Specified by:
      handle in interface ShoppingFareSearchHandler
      Overrides:
      handle in class ShoppingPriceHandler
      Parameters:
      searchResponseMessage - the search response message
      fareShopMessage - the fare shop message
      fareSearchRequestData - the fare search request data
      fareSelectionData - the fare selection data
    • getPassengerRef

      protected Map<Integer,String> getPassengerRef(FareShopMessage fareShopMessage)
      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 data
      itineraryPricingInfoData - the itinerary pricing info data
      pricedItinerary - the priced itinerary
      searchResponseMessage - the search response message
      prosBundleRef - the pros bundle ref
      prosPassengerRef - 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

      protected BigDecimal getTotalFromNonFareProducts(TravelBundleTemplateData bundleTemplateData)
      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 itinerary
      travelBundleTemplateData - 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 list
      transportOfferingCode - the transport offering code
      sectorCode - the sector code
      bundleTemplate - 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 list
      bundleTemplate - the bundle template
    • createPriceData

      protected PriceData createPriceData(de.hybris.platform.jalo.order.price.PriceInformation priceInfo)
      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 data
      pricedItinerary - the priced itinerary
      bookingSolution - the booking solution
      prosSearchResponseMessage - the search response message
      prosPassengerRef - the pros passenger ref
    • calculateTotals

      protected void calculateTotals(ItineraryPricingInfoData itineraryPricingInfoData)
      Calculate totals.
      Parameters:
      itineraryPricingInfoData - the itinerary pricing info data
    • createPriceData

      protected PriceData createPriceData(BigDecimal amount)
      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 id
      solution - the solution
      pricedItinerary - the priced itinerary
      Returns:
      the pricing solution id
    • getProsBundleRef

      protected Map<String,Integer> getProsBundleRef(PROSSearchResponse prosSearchResponse)
      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 transportOfferingData
      bundleTemplateModel - the bundleTemplateModel
      productData - 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 bundleTemplateId
      productData - 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 bookingCode
      pricedItinerary - the pricedItinerary
      tripSegmentToFlightsMap - 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 prosSearchResponseMessage
      bookingSolution - the bookingSolution
      pricedItinerary - the pricedItinerary
      prosPassengerRef - the prosPassengerRef
      Returns:
      the list of prosFareDataList
    • getProsSearchResponseService

      protected PROSSearchResponseService getProsSearchResponseService()
      Gets pros search response service.
      Returns:
      the pros search response service
    • setProsSearchResponseService

      public void setProsSearchResponseService(PROSSearchResponseService prosSearchResponseService)
      Sets pros search response service.
      Parameters:
      prosSearchResponseService - the pros search response service
    • getPassengerTypeFacade

      protected PassengerTypeFacade getPassengerTypeFacade()
      Gets passenger type facade.
      Returns:
      the passenger type facade
    • setPassengerTypeFacade

      public void setPassengerTypeFacade(PassengerTypeFacade passengerTypeFacade)
      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

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

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

      protected Map<String,String> getPaxToPassengerCodeTypeMapping()
      Gets pax to passenger code type mapping.
      Returns:
      the pax to passenger code type mapping
    • setPaxToPassengerCodeTypeMapping

      public void setPaxToPassengerCodeTypeMapping(Map<String,String> paxToPassengerCodeTypeMapping)
      Sets pax to passenger code type mapping.
      Parameters:
      paxToPassengerCodeTypeMapping - the pax to passenger code type mapping
    • getOriginDestinationRefToDirectionMap

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

      protected PROSTransportOfferingFacade getProsTransportOfferingFacade()
      Gets pros transport offering facade.
      Returns:
      the pros transport offering facade
    • setProsTransportOfferingFacade

      public void setProsTransportOfferingFacade(PROSTransportOfferingFacade prosTransportOfferingFacade)
      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