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 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: EvaluateChangeSolutionResponseHandler
      Handler to populate the reference data section and the repriced solutions.
      Specified by:
      handle in interface EvaluateChangeSolutionResponseHandler
      Parameters:
      orderModel - the abstract order model
      repricingRequestData - the repricingRequestData
      repricerRequest - the repricer request
      repricerResponse - 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 response
      evaluateChangeSolutionResponseData - the evaluate change solution response data
      orderModel - the order model
      repricedSolutionDataList - 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 solution
      orderModel - the order model
      repricedSolutionData - the repriced solution data
      flightIdTransportOfferingCodeMap - 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 tkt
      flightIdTransportOfferingCodeMap - the flight id transport offering code map
      orderModel - 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 flights
      flightIdTransportOfferingCodeMap - the flight id transport offering code map
      paxId - 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 exchange
      orderModel - 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 ChangeFlightException
      Populates 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 list
      flightDataReferenceList - the flight data reference list
      changedTktSolution - the changed tkt solution
      repricedSolutionData - the repriced solution data
      flightIdTransportOfferingCodeMap - 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 data
      bundleTemplateModel - the bundle template model
      transportOfferingCodes - the transport offering codes
    • populateCharges

      protected void populateCharges(List<Charge> charges, LinkedList<BaggageChargeData> chargeList)
      Populate charges.
      Parameters:
      charges - the charges
      chargeList - 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 allowances
      allowanceList - the allowance list
      allowanceRefs - the allowance refs
      flightIdTransportOfferingCodeMap - 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 ons
      carryOnList - the carry on list
      carryOnRefs - the carry on refs
      flightIdTransportOfferingCodeMap - the flight id transport offering code map
    • 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
    • getProsTravelBundleTemplateService

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

      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
    • 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