Class DefaultEvaluateChangeSolutionResponseRepricedSolutionsHandler
java.lang.Object
de.hybris.platform.prosfacades.repricer.handler.impl.DefaultEvaluateChangeSolutionResponseRepricedSolutionsHandler
- All Implemented Interfaces:
EvaluateChangeSolutionResponseHandler
public class DefaultEvaluateChangeSolutionResponseRepricedSolutionsHandler
extends Object
implements EvaluateChangeSolutionResponseHandler
Populates the repriced solutions of
EvaluateChangeSolutionResponseData from RepricerResponse-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ChangeInfoDatacreateChangeInfoData(TktExchange tktExchange, AbstractOrderModel orderModel) Create change info data change info data.protected List<SelectedFlightData>createFlights(List<RepricerResponseFlight> flights, Map<Integer, String> flightIdTransportOfferingCodeMap, Integer paxId) Creates the flights list.protected List<SegmentRepricingData>createSegmentBreakdowns(PaxTkt paxTkt, Map<Integer, String> flightIdTransportOfferingCodeMap, AbstractOrderModel orderModel) Create segment breakdowns list.protected PROSTravelAncillaryServiceGets pros travel ancillary service.protected PROSTravelBundleTemplateServiceGets pros travel bundle template service.protected TransportOfferingServiceGets transport offering service.protected TravelCommercePriceFacadeGets travel commerce price facade.voidhandle(AbstractOrderModel orderModel, RepricingRequestData repricingRequestData, RepricerRequest repricerRequest, RepricerResponse repricerResponse, EvaluateChangeSolutionResponseData evaluateChangeSolutionResponseData) Handler to populate the reference data section and the repriced solutions.protected voidpopulateAllowances(List<RepricerAllowance> allowances, LinkedList<BaggageData> allowanceList, List<SolutionBaggageInfoData> allowanceRefs, Map<Integer, String> flightIdTransportOfferingCodeMap) Populate allowances.protected voidpopulateBundleProductData(List<FareBundleProductData> basicProductDataList, BundleTemplateModel bundleTemplateModel, List<String> transportOfferingCodes) Populates the bundle product data from the bundle templateprotected voidpopulateCarryOns(List<RepricerCarryOn> carryOns, LinkedList<BaggageData> carryOnList, List<SolutionBaggageInfoData> carryOnRefs, Map<Integer, String> flightIdTransportOfferingCodeMap) Populates the allowances.protected voidpopulateCharges(List<Charge> charges, LinkedList<BaggageChargeData> chargeList) Populate charges.protected voidpopulateFareInformation(List<FareData> fareDataReferenceList, List<FlightData> flightDataReferenceList, ChangedTktSolution changedTktSolution, RepricedSolutionData repricedSolutionData, Map<Integer, String> flightIdTransportOfferingCodeMap) Populates the fare information, such as fare bundles and included products.protected voidpopulatePassengerRepricingInfos(ChangedTktSolution changedTktSolution, AbstractOrderModel orderModel, RepricedSolutionData repricedSolutionData, Map<Integer, String> flightIdTransportOfferingCodeMap) Populates the passenger repricing infos.protected voidpopulateRepricedSolutions(RepricerResponse repricerResponse, EvaluateChangeSolutionResponseData evaluateChangeSolutionResponseData, AbstractOrderModel orderModel, List<RepricedSolutionData> repricedSolutionDataList) Populates the repriced solutions from each changedTktSolution in the repricer response.voidsetProsTravelAncillaryService(PROSTravelAncillaryService prosTravelAncillaryService) Sets pros travel ancillary service.voidsetProsTravelBundleTemplateService(PROSTravelBundleTemplateService prosTravelBundleTemplateService) Sets pros travel bundle template service.voidsetTransportOfferingService(TransportOfferingService transportOfferingService) Sets transport offering service.voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Sets travel commerce price facade.
-
Constructor Details
-
DefaultEvaluateChangeSolutionResponseRepricedSolutionsHandler
public DefaultEvaluateChangeSolutionResponseRepricedSolutionsHandler()
-
-
Method Details
-
handle
public void handle(AbstractOrderModel orderModel, RepricingRequestData repricingRequestData, RepricerRequest repricerRequest, RepricerResponse repricerResponse, EvaluateChangeSolutionResponseData evaluateChangeSolutionResponseData) throws ChangeFlightException Description copied from interface:EvaluateChangeSolutionResponseHandlerHandler to populate the reference data section and the repriced solutions.- Specified by:
handlein interfaceEvaluateChangeSolutionResponseHandler- Parameters:
orderModel- the abstract order modelrepricingRequestData- the repricingRequestDatarepricerRequest- the repricer requestrepricerResponse- the repricer response- Throws:
ChangeFlightException
-
populateRepricedSolutions
protected void populateRepricedSolutions(RepricerResponse repricerResponse, EvaluateChangeSolutionResponseData evaluateChangeSolutionResponseData, AbstractOrderModel orderModel, List<RepricedSolutionData> repricedSolutionDataList) throws ChangeFlightException Populates the repriced solutions from each changedTktSolution in the repricer response.- Parameters:
repricerResponse- the repricer responseevaluateChangeSolutionResponseData- the evaluate change solution response dataorderModel- the order modelrepricedSolutionDataList- the repriced solution data list- Throws:
ChangeFlightException
-
populatePassengerRepricingInfos
protected void populatePassengerRepricingInfos(ChangedTktSolution changedTktSolution, AbstractOrderModel orderModel, RepricedSolutionData repricedSolutionData, Map<Integer, String> flightIdTransportOfferingCodeMap) Populates the passenger repricing infos.- Parameters:
changedTktSolution- the changed tkt solutionorderModel- the order modelrepricedSolutionData- the repriced solution dataflightIdTransportOfferingCodeMap- the flight id transport offering code map
-
createSegmentBreakdowns
protected List<SegmentRepricingData> createSegmentBreakdowns(PaxTkt paxTkt, Map<Integer, String> flightIdTransportOfferingCodeMap, AbstractOrderModel orderModel) Create segment breakdowns list.- Parameters:
paxTkt- the pax tktflightIdTransportOfferingCodeMap- the flight id transport offering code maporderModel- the order model- Returns:
- the list of segment repricing data
-
createFlights
protected List<SelectedFlightData> createFlights(List<RepricerResponseFlight> flights, Map<Integer, String> flightIdTransportOfferingCodeMap, Integer paxId) Creates the flights list.- Parameters:
flights- the flightsflightIdTransportOfferingCodeMap- the flight id transport offering code mappaxId- the pax id- Returns:
- the list of selectedFlightData
-
createChangeInfoData
protected ChangeInfoData createChangeInfoData(TktExchange tktExchange, AbstractOrderModel orderModel) Create change info data change info data.- Parameters:
tktExchange- the tkt exchangeorderModel- the order model- Returns:
- the change info data
-
populateFareInformation
protected void populateFareInformation(List<FareData> fareDataReferenceList, List<FlightData> flightDataReferenceList, ChangedTktSolution changedTktSolution, RepricedSolutionData repricedSolutionData, Map<Integer, String> flightIdTransportOfferingCodeMap) throws ChangeFlightExceptionPopulates the fare information, such as fare bundles and included products. Checks if the fare in the changedTktSolution is present in the data reference. If not, the fare does not exists in the system and the solution cannot be added to the repricedSolution list.- Parameters:
fareDataReferenceList- the fare data reference listflightDataReferenceList- the flight data reference listchangedTktSolution- the changed tkt solutionrepricedSolutionData- the repriced solution dataflightIdTransportOfferingCodeMap- the flight id transport offering code map- Throws:
ChangeFlightException
-
populateBundleProductData
protected void populateBundleProductData(List<FareBundleProductData> basicProductDataList, BundleTemplateModel bundleTemplateModel, List<String> transportOfferingCodes) Populates the bundle product data from the bundle template- Parameters:
basicProductDataList- list of product databundleTemplateModel- the bundle template modeltransportOfferingCodes- the transport offering codes
-
populateCharges
Populate charges.- Parameters:
charges- the chargeschargeList- the charge list
-
populateAllowances
protected void populateAllowances(List<RepricerAllowance> allowances, LinkedList<BaggageData> allowanceList, List<SolutionBaggageInfoData> allowanceRefs, Map<Integer, String> flightIdTransportOfferingCodeMap) Populate allowances.- Parameters:
allowances- the allowancesallowanceList- the allowance listallowanceRefs- the allowance refsflightIdTransportOfferingCodeMap- the flight id transport offering code map
-
populateCarryOns
protected void populateCarryOns(List<RepricerCarryOn> carryOns, LinkedList<BaggageData> carryOnList, List<SolutionBaggageInfoData> carryOnRefs, Map<Integer, String> flightIdTransportOfferingCodeMap) Populates the allowances.- Parameters:
carryOns- the carry onscarryOnList- the carry on listcarryOnRefs- the carry on refsflightIdTransportOfferingCodeMap- the flight id transport offering code map
-
getTransportOfferingService
Gets transport offering service.- Returns:
- the transport offering service
-
setTransportOfferingService
Sets transport offering service.- Parameters:
transportOfferingService- the transport offering service
-
getProsTravelBundleTemplateService
Gets pros travel bundle template service.- Returns:
- the pros travel bundle template service
-
setProsTravelBundleTemplateService
public void setProsTravelBundleTemplateService(PROSTravelBundleTemplateService prosTravelBundleTemplateService) Sets pros travel bundle template service.- Parameters:
prosTravelBundleTemplateService- the pros travel bundle template service
-
getTravelCommercePriceFacade
Gets travel commerce price facade.- Returns:
- the travel commerce price facade
-
setTravelCommercePriceFacade
Sets travel commerce price facade.- Parameters:
travelCommercePriceFacade- the travel commerce price facade
-
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
-