Class PROSFlightSolutionsHandler
java.lang.Object
de.hybris.platform.prosfacades.fare.search.handlers.impl.PROSFlightSolutionsHandler
- All Implemented Interfaces:
ShoppingFlightSearchHandler
The type Pros Flight solutions handler populates the solution from pros in the flight search response.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanareBundleProductsAvailable(Map<String, List<String>> bundleProductCodesMap, FlightSearchResponseData flightSearchResponseData, List<String> flightReferenceCodes) Check if the stock are available for bundle products.protected booleancheckIfFlightGroupForSolutionExists(List<Integer> flightGroupIDs, List<String> availableFlightGroups) Check if the the flight groups in the solution existcreateBundleProductsMap(FlightSearchResponseData flightSearchResponseData) Create a map of bundle and product codesprotected List<TaxPriceInfoData>getAirportTaxBreakDown(Price price) Get Airport tax breakdownprotected List<TaxFlightPriceInfoData>getAirportTaxFlightBreakdown(Price price, Map<Integer, String> flightIdCodeMap) Get Airport tax flight breakdownprotected List<TaxPassengerPriceInfoData>getAirportTaxPassengerBreakdown(Price price, Solution solution, FlightSearchResponseData flightSearchResponseData) Get Airport tax passenger breakdowngetApplicableFareBundles(Solution solutions, int pricingSolutionID) Get applicable fare bundlesprotected List<SolutionBaggageInfoData>getBaggageAllowanceInfo(List<BaggageInfoRefAllowance> baggageInfoRefAllowances, Map<Integer, String> flightIdCodeMap) Get baggage allowance infoprotected List<SolutionBaggageInfoData>getBaggageCarryOnInfo(List<BaggageInfoReferenceCarryOn> baggageInfoReferenceCarryOns, Map<Integer, String> flightIdCodeMap) Get baggage carry on infoprotected List<SolutionBaggageInfoData>getBaggageCharges(List<FeatureApplicationCharge> featureApplicationCharges, Map<Integer, String> flightIdCodeMap) Get baggage chargesprotected SolutionBaggagesDatagetBaggagesForSolution(BaggageInfoReference baggageInfoReference, Map<Integer, String> flightIdCodeMap) Get baggages for solutionprotected List<PassengersBookingClassesBreakdownData>getBookingClassBreakDown(BookingSolution bookingSolution, Map<Integer, String> flightIdCodeMap) Get booking class breakdownprotected List<FareReferenceData>getBookingOptionFares(List<FareReference> fareReferenceList, Map<Integer, String> flightIdCodeMap) Get booking option faresprotected TravelCommerceStockServiceGets commerce stock service.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 detailsprotected StringgetFlightGroupRefIdForSegment(Integer tripSegment, Solution solution, FlightSearchResponseData flightSearchResponseData) Get flight group ref id for segment idGet the flight reference codesprotected List<PassengerPriceInfoData>getPassengerBreakdown(Price price) Get the passenger breakdownprotected de.hybris.platform.product.ProductServiceGets product service.protected PROSTravelAncillaryServiceGets pros travel ancillary service.protected List<RbdInfoData>Get RDBprotected List<SolutionSegmentPriceInfoData>getSegmentPriceBreakDown(Price price, Solution solution, FlightSearchResponseData flightSearchResponseData) Get segment price breakdownprotected SolutionPriceDatagetSolutionPriceDetails(BookingSolution bookingSolution, Map<Integer, String> flightIdCodeMap, Solution solution, FlightSearchResponseData flightSearchResponseData) Get solution price detailsprotected SolutionPriceInfoDatagetTotalSolutionPrice(Price price) Get total solution priceprotected TransportOfferingServiceGets transport offering service.protected TravelCommercePriceFacadeGets travel commerce price facade.protected List<TaxPriceInfoData>getYqyrBreakdown(Price price) Get Yqyr breakdownvoidhandle(SearchResponseMessage searchResponseMessage, FareShopMessage fareShopMessage, FlightSearchResponseData flightSearchResponseData, Map<String, TransportOfferingData> transportOfferingDataMap, Map<Integer, String> flightIdCodeMap, FlightSearchRequestData flightSearchRequestData) Handle methodprotected booleanisAllowancesAvailable(BaggageInfoReference baggageInSolution, BaggageInfo baggageInfo) Checks if allowances in the solution exist in the system.protected booleanisBaggageAvailable(BaggageInfoReference baggageInSolution, BaggageInfo baggageInfo) Returns true if the baggage, carry on and charges in a solution exist in the system.protected booleanisCarryOnsAvailable(BaggageInfoReference baggageInSolution, BaggageInfo baggageInfo) Checks if the carry ons in the solution exist in the system.protected booleanisChargesAvailable(BaggageInfoReference baggageInSolution, BaggageInfo baggageInfo) Checks if the charges in a solution exist in the system.protected booleanisProductAvailable(List<String> flightReferenceCodes, int numberOfPassengers, String productCode) Checks if the product is in stock for given flights.protected voidpopulateFareBundleProducts(List<FareBundleProductData> fareBundleProducts, Map<String, List<String>> bundleProductCodesMap, Map<Integer, String> fareBundleCodeMap, List<Integer> bundleIds, FlightSearchResponseData flightSearchResponseData, SolutionData solutionData) populate the fare bundle products listprotected voidpopulateSolutionDetails(PROSSearchResponse prosSearchResponse, FlightSearchResponseData flightSearchResponseData, Map<Integer, String> flightIdCodeMap) Populate solution detailsprotected 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 pricesvoidsetCommerceStockService(TravelCommerceStockService commerceStockService) Sets commerce stock service.voidsetProductService(de.hybris.platform.product.ProductService productService) Sets product service.voidsetProsTravelAncillaryService(PROSTravelAncillaryService prosTravelAncillaryService) Sets pros travel ancillary service.voidsetTransportOfferingService(TransportOfferingService transportOfferingService) Sets transport offering service.voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Sets travel commerce price facade.
-
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: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
-
populateSolutionDetails
protected void populateSolutionDetails(PROSSearchResponse prosSearchResponse, FlightSearchResponseData flightSearchResponseData, Map<Integer, String> flightIdCodeMap) Populate solution details- Parameters:
prosSearchResponse- pros search responseflightSearchResponseData- the flight search response dataflightIdCodeMap- 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 solutionavailableFlightGroups- 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 solutionflightIdCodeMap- the flight Id and and flight code mapfareIdRefMap- the fare id and fare code mapflightSearchResponseData- flight search responsesolutionData- the solution databundleProductCodesMap- the bundle product codes mapbaggageInfo- 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 mapflightSearchResponseData- the flight search response dataflightReferenceCodes- 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 codesnumberOfPassengers- the number of passengersproductCode- 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 solutionbaggageInfo- 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 solutionbaggageInfo- 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 solutionbaggageInfo- 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 solutionbaggageInfo- 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 solutionsflightIdCodeMap- the flight id and code mapsolution- the solutionflightSearchResponseData- flight search response data- Returns:
- the solution price data
-
getPassengerBreakdown
Get the passenger breakdown- Parameters:
price- the price- Returns:
- list of passenger price info data
-
getYqyrBreakdown
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 pricesolution- booking SolutionflightSearchResponseData- 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 idsolution- the solutionflightSearchResponseData- 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 priceflightIdCodeMap- the flight id and flight code map- Returns:
- list of Tax flight price info data
-
getAirportTaxBreakDown
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 pricesolution- the solutionflightSearchResponseData- flight search response data- Returns:
- list of solution segment price info data
-
getTotalSolutionPrice
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 mapbookingSolution- 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 listflightIdCodeMap- 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 solutionsfareIdRefMap- the fare id and the reference code mapflightSearchResponseData- fare search response databookingOptionData- booking option datasolutionData- solution datapriceSolutionID- pricing solutionIDbundleProductCodesMap- 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 productsbundleProductCodesMap- bundle to list of products mapfareBundleCodeMap- fare bundle id to code mapbundleIds- bundle IdsflightSearchResponseData- flight search responsesolutionData- solution data
-
getApplicableFareBundles
Get applicable fare bundles- Parameters:
solutions- solutionspricingSolutionID- 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 referenceflightIdCodeMap- 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 chargesflightIdCodeMap- 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 allowancesflightIdCodeMap- 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 onsflightIdCodeMap- 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 solutionflightIdCodeMap- flight id and reference code map- Returns:
- list of Passengers booking classes breakdown data
-
getRDB
Get RDB- Parameters:
rbdList- the rdb listflightIdCodeMap- flight id and reference code map- Returns:
- list of Rdb info data
-
getTravelCommercePriceFacade
Gets travel commerce price facade.- Returns:
- the travelCommercePriceFacade
-
setTravelCommercePriceFacade
Sets travel commerce price facade.- Parameters:
travelCommercePriceFacade- the travelCommercePriceFacade to set
-
getProsTravelAncillaryService
Gets pros travel ancillary service.- Returns:
- the pros travel ancillary service
-
setProsTravelAncillaryService
Sets pros travel ancillary service.- Parameters:
prosTravelAncillaryService- the pros travel ancillary service
-
getTransportOfferingService
Gets transport offering service.- Returns:
- the transport offering service
-
setTransportOfferingService
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
Gets commerce stock service.- Returns:
- the commerce stock service
-
setCommerceStockService
Sets commerce stock service.- Parameters:
commerceStockService- the commerce stock service
-