Class PROSFlightSolutionsHandler

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

public class PROSFlightSolutionsHandler extends Object implements ShoppingFlightSearchHandler
The type Pros Flight solutions handler populates the solution from pros in the flight search response.
  • Constructor Details

    • PROSFlightSolutionsHandler

      public PROSFlightSolutionsHandler()
  • 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
    • populateSolutionDetails

      protected void populateSolutionDetails(PROSSearchResponse prosSearchResponse, FlightSearchResponseData flightSearchResponseData, Map<Integer,String> flightIdCodeMap)
      Populate solution details
      Parameters:
      prosSearchResponse - pros search response
      flightSearchResponseData - the flight search response data
      flightIdCodeMap - the flight id code map
    • createBundleProductsMap

      protected Map<String,List<String>> createBundleProductsMap(FlightSearchResponseData flightSearchResponseData)
      Create a map of bundle and product codes
      Parameters:
      flightSearchResponseData - the flight search response data
      Returns:
      map of bundle code and list of products
    • checkIfFlightGroupForSolutionExists

      protected boolean checkIfFlightGroupForSolutionExists(List<Integer> flightGroupIDs, List<String> availableFlightGroups)
      Check if the the flight groups in the solution exist
      Parameters:
      flightGroupIDs - the flight group ids in solution
      availableFlightGroups - all available flight group ids
      Returns:
      boolean
    • populateSolutionPricingOptions

      protected List<PricingOptionData> populateSolutionPricingOptions(Solution solution, Map<Integer,String> flightIdCodeMap, Map<Integer,String> fareIdRefMap, FlightSearchResponseData flightSearchResponseData, SolutionData solutionData, Map<String,List<String>> bundleProductCodesMap, BaggageInfo baggageInfo)
      Populate the solution prices
      Parameters:
      solution - the solution
      flightIdCodeMap - the flight Id and and flight code map
      fareIdRefMap - the fare id and fare code map
      flightSearchResponseData - flight search response
      solutionData - the solution data
      bundleProductCodesMap - the bundle product codes map
      baggageInfo - the baggage info
      Returns:
      list
    • areBundleProductsAvailable

      protected boolean areBundleProductsAvailable(Map<String,List<String>> bundleProductCodesMap, FlightSearchResponseData flightSearchResponseData, List<String> flightReferenceCodes)
      Check if the stock are available for bundle products.
      Parameters:
      bundleProductCodesMap - the bundle product codes map
      flightSearchResponseData - the flight search response data
      flightReferenceCodes - the flight reference codes
      Returns:
      the boolean
    • isProductAvailable

      protected boolean isProductAvailable(List<String> flightReferenceCodes, int numberOfPassengers, String productCode)
      Checks if the product is in stock for given flights.
      Parameters:
      flightReferenceCodes - the flight reference codes
      numberOfPassengers - the number of passengers
      productCode - the product code
      Returns:
      the boolean
    • isBaggageAvailable

      protected boolean isBaggageAvailable(BaggageInfoReference baggageInSolution, BaggageInfo baggageInfo)
      Returns true if the baggage, carry on and charges in a solution exist in the system.
      Parameters:
      baggageInSolution - the baggage in solution
      baggageInfo - the baggage info
      Returns:
      boolean boolean
    • isChargesAvailable

      protected boolean isChargesAvailable(BaggageInfoReference baggageInSolution, BaggageInfo baggageInfo)
      Checks if the charges in a solution exist in the system.
      Parameters:
      baggageInSolution - the baggage in solution
      baggageInfo - the baggage info
      Returns:
      the boolean
    • isCarryOnsAvailable

      protected boolean isCarryOnsAvailable(BaggageInfoReference baggageInSolution, BaggageInfo baggageInfo)
      Checks if the carry ons in the solution exist in the system.
      Parameters:
      baggageInSolution - the baggage in solution
      baggageInfo - the baggage info
      Returns:
      the boolean
    • isAllowancesAvailable

      protected boolean isAllowancesAvailable(BaggageInfoReference baggageInSolution, BaggageInfo baggageInfo)
      Checks if allowances in the solution exist in the system.
      Parameters:
      baggageInSolution - the baggage in solution
      baggageInfo - the baggage info
      Returns:
      the boolean
    • getSolutionPriceDetails

      protected SolutionPriceData getSolutionPriceDetails(BookingSolution bookingSolution, Map<Integer,String> flightIdCodeMap, Solution solution, FlightSearchResponseData flightSearchResponseData)
      Get solution price details
      Parameters:
      bookingSolution - the booking solutions
      flightIdCodeMap - the flight id and code map
      solution - the solution
      flightSearchResponseData - flight search response data
      Returns:
      the solution price data
    • getPassengerBreakdown

      protected List<PassengerPriceInfoData> getPassengerBreakdown(Price price)
      Get the passenger breakdown
      Parameters:
      price - the price
      Returns:
      list of passenger price info data
    • getYqyrBreakdown

      protected List<TaxPriceInfoData> getYqyrBreakdown(Price price)
      Get Yqyr breakdown
      Parameters:
      price - the price
      Returns:
      list of TaxPriceInfoData
    • getAirportTaxPassengerBreakdown

      protected List<TaxPassengerPriceInfoData> getAirportTaxPassengerBreakdown(Price price, Solution solution, FlightSearchResponseData flightSearchResponseData)
      Get Airport tax passenger breakdown
      Parameters:
      price - the price
      solution - booking Solution
      flightSearchResponseData - flight search response data
      Returns:
      list of Tax passenger price info data
    • getFlightGroupRefIdForSegment

      protected String getFlightGroupRefIdForSegment(Integer tripSegment, Solution solution, FlightSearchResponseData flightSearchResponseData)
      Get flight group ref id for segment id
      Parameters:
      tripSegment - the segment id
      solution - the solution
      flightSearchResponseData - flight search response data
      Returns:
      the flight group ref id for segment
    • getAirportTaxFlightBreakdown

      protected List<TaxFlightPriceInfoData> getAirportTaxFlightBreakdown(Price price, Map<Integer,String> flightIdCodeMap)
      Get Airport tax flight breakdown
      Parameters:
      price - the price
      flightIdCodeMap - the flight id and flight code map
      Returns:
      list of Tax flight price info data
    • getAirportTaxBreakDown

      protected List<TaxPriceInfoData> getAirportTaxBreakDown(Price price)
      Get Airport tax breakdown
      Parameters:
      price - the price
      Returns:
      list of Tax price info data
    • getSegmentPriceBreakDown

      protected List<SolutionSegmentPriceInfoData> getSegmentPriceBreakDown(Price price, Solution solution, FlightSearchResponseData flightSearchResponseData)
      Get segment price breakdown
      Parameters:
      price - the price
      solution - the solution
      flightSearchResponseData - flight search response data
      Returns:
      list of solution segment price info data
    • getTotalSolutionPrice

      protected SolutionPriceInfoData getTotalSolutionPrice(Price price)
      Get total solution price
      Parameters:
      price - the price in response
      Returns:
      the Solution price info data
    • getFlightReferenceCodes

      protected List<String> getFlightReferenceCodes(Map<Integer,String> flightIdCodeMap, List<Integer> bookingSolution)
      Get the flight reference codes
      Parameters:
      flightIdCodeMap - the flight id and flight code map
      bookingSolution - the booking solution details
      Returns:
      List of flight reference codes
    • getBookingOptionFares

      protected List<FareReferenceData> getBookingOptionFares(List<FareReference> fareReferenceList, Map<Integer,String> flightIdCodeMap)
      Get booking option fares
      Parameters:
      fareReferenceList - the fare reference list
      flightIdCodeMap - the flight id and flight code map
      Returns:
      list of fare reference data
    • getFareBundleDetails

      protected List<FareBundlesData> getFareBundleDetails(Solution solutions, Map<Integer,String> fareIdRefMap, FlightSearchResponseData flightSearchResponseData, BookingOptionData bookingOptionData, SolutionData solutionData, Integer priceSolutionID, Map<String,List<String>> bundleProductCodesMap)
      Get fare bundle details
      Parameters:
      solutions - the solutions
      fareIdRefMap - the fare id and the reference code map
      flightSearchResponseData - fare search response data
      bookingOptionData - booking option data
      solutionData - solution data
      priceSolutionID - pricing solutionID
      bundleProductCodesMap - the bundle product codes map
      Returns:
      list of fare bundle data
    • populateFareBundleProducts

      protected void populateFareBundleProducts(List<FareBundleProductData> fareBundleProducts, Map<String,List<String>> bundleProductCodesMap, Map<Integer,String> fareBundleCodeMap, List<Integer> bundleIds, FlightSearchResponseData flightSearchResponseData, SolutionData solutionData)
      populate the fare bundle products list
      Parameters:
      fareBundleProducts - list of fare bundle products
      bundleProductCodesMap - bundle to list of products map
      fareBundleCodeMap - fare bundle id to code map
      bundleIds - bundle Ids
      flightSearchResponseData - flight search response
      solutionData - solution data
    • getApplicableFareBundles

      protected List<Integer> getApplicableFareBundles(Solution solutions, int pricingSolutionID)
      Get applicable fare bundles
      Parameters:
      solutions - solutions
      pricingSolutionID - the price solution id
      Returns:
      list of fare bucket ids
    • getBaggagesForSolution

      protected SolutionBaggagesData getBaggagesForSolution(BaggageInfoReference baggageInfoReference, Map<Integer,String> flightIdCodeMap)
      Get baggages for solution
      Parameters:
      baggageInfoReference - baggage info reference
      flightIdCodeMap - flight id and reference code map
      Returns:
      the solution baggages data
    • getBaggageCharges

      protected List<SolutionBaggageInfoData> getBaggageCharges(List<FeatureApplicationCharge> featureApplicationCharges, Map<Integer,String> flightIdCodeMap)
      Get baggage charges
      Parameters:
      featureApplicationCharges - list of feature application charges
      flightIdCodeMap - flight id and reference code map
      Returns:
      list of solution baggage info data
    • getBaggageAllowanceInfo

      protected List<SolutionBaggageInfoData> getBaggageAllowanceInfo(List<BaggageInfoRefAllowance> baggageInfoRefAllowances, Map<Integer,String> flightIdCodeMap)
      Get baggage allowance info
      Parameters:
      baggageInfoRefAllowances - baggage info reference allowances
      flightIdCodeMap - flight id and reference code map
      Returns:
      list of solution baggage info data
    • getBaggageCarryOnInfo

      protected List<SolutionBaggageInfoData> getBaggageCarryOnInfo(List<BaggageInfoReferenceCarryOn> baggageInfoReferenceCarryOns, Map<Integer,String> flightIdCodeMap)
      Get baggage carry on info
      Parameters:
      baggageInfoReferenceCarryOns - baggage info reference carry ons
      flightIdCodeMap - flight id and reference code map
      Returns:
      list of solution baggage info data
    • getBookingClassBreakDown

      protected List<PassengersBookingClassesBreakdownData> getBookingClassBreakDown(BookingSolution bookingSolution, Map<Integer,String> flightIdCodeMap)
      Get booking class breakdown
      Parameters:
      bookingSolution - the booking solution
      flightIdCodeMap - flight id and reference code map
      Returns:
      list of Passengers booking classes breakdown data
    • getRDB

      protected List<RbdInfoData> getRDB(List<Rbd> rbdList, Map<Integer,String> flightIdCodeMap)
      Get RDB
      Parameters:
      rbdList - the rdb list
      flightIdCodeMap - flight id and reference code map
      Returns:
      list of Rdb info data
    • 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
    • getProsTravelAncillaryService

      protected PROSTravelAncillaryService getProsTravelAncillaryService()
      Gets pros travel ancillary service.
      Returns:
      the pros travel ancillary service
    • setProsTravelAncillaryService

      public void setProsTravelAncillaryService(PROSTravelAncillaryService prosTravelAncillaryService)
      Sets pros travel ancillary service.
      Parameters:
      prosTravelAncillaryService - the pros travel ancillary service
    • getTransportOfferingService

      protected TransportOfferingService getTransportOfferingService()
      Gets transport offering service.
      Returns:
      the transport offering service
    • setTransportOfferingService

      public void setTransportOfferingService(TransportOfferingService transportOfferingService)
      Sets transport offering service.
      Parameters:
      transportOfferingService - the transport offering service
    • getProductService

      protected de.hybris.platform.product.ProductService getProductService()
      Gets product service.
      Returns:
      the product service
    • setProductService

      public void setProductService(de.hybris.platform.product.ProductService productService)
      Sets product service.
      Parameters:
      productService - the product service
    • getCommerceStockService

      protected TravelCommerceStockService getCommerceStockService()
      Gets commerce stock service.
      Returns:
      the commerce stock service
    • setCommerceStockService

      public void setCommerceStockService(TravelCommerceStockService commerceStockService)
      Sets commerce stock service.
      Parameters:
      commerceStockService - the commerce stock service