Class DefaultIntelliPricerOdGroupsFareRestrictionsHandler

java.lang.Object
de.hybris.platform.prosfacades.fare.price.handlers.impl.DefaultIntelliPricerOdGroupsFareRestrictionsHandler
All Implemented Interfaces:
IntelliPricerRequestHandler

public class DefaultIntelliPricerOdGroupsFareRestrictionsHandler extends Object implements IntelliPricerRequestHandler
The implementation of IntelliPricerRequestHandler interface. This class populates the origin destination group list and the fare restriction list in an IntelliPricerRequest.
  • Constructor Details

    • DefaultIntelliPricerOdGroupsFareRestrictionsHandler

      public DefaultIntelliPricerOdGroupsFareRestrictionsHandler()
  • Method Details

    • handle

      public void handle(AddSolutionRequestData addSolutionRequestData, IntelliPricerRequest intelliPricerRequest) throws FarePriceException
      This handler takes the list of originDestinationGroupData from the addSolutionRequestData and creates the respective originDestinationGroup and fare restriction for the intelliPricerRequest.
      Specified by:
      handle in interface IntelliPricerRequestHandler
      Parameters:
      addSolutionRequestData - the addSolutionRequestData
      intelliPricerRequest - the intelliPricerRequest
      Throws:
      FarePriceException
    • createOriginDestinationGroups

      protected void createOriginDestinationGroups(AddSolutionRequestData addSolutionRequestData, IntelliPricerRequest intelliPricerRequest) throws FarePriceException
      Creates the list of origin destination group and fare restrictions from an addSolutionRequestData.
      Parameters:
      addSolutionRequestData - the add solution request data
      intelliPricerRequest - the intelli pricer request
      Throws:
      FarePriceException - the fare price exception if an error occurs during the creation of an origin destination group or fare restriction.
    • createOriginDestinationGroup

      protected OriginDestinationGroup createOriginDestinationGroup(OriginDestinationGroupData originDestinationGroupData, IntelliPricerRequest intelliPricerRequest, AddSolutionRequestData addSolutionRequestData, List<FareRestriction> fareRestrictions, Set<OriginDestinationGroup> originDestinationGroups, int originDestinationGroupId) throws FarePriceException
      Creates an origin destination group.
      Parameters:
      originDestinationGroupData - the origin destination group data
      intelliPricerRequest - the intelli pricer request
      addSolutionRequestData - the add solution request data
      fareRestrictions - the fare restrictions
      originDestinationGroups - the origin destination groups
      originDestinationGroupId - the origin destination group id
      Returns:
      the origin destination group
      Throws:
      FarePriceException - the fare price exception if an error occurs during the creation of an origin destination group.
    • createFlights

      protected List<Flight> createFlights(List<SelectedFlightData> selectedFlightDataList, Set<OriginDestinationGroup> originDestinationGroups) throws FarePriceException
      Creates a list of flights from the selectedFlightData list.
      Parameters:
      selectedFlightDataList - the selected flight data list
      originDestinationGroups - the origin destination groups
      Returns:
      the list of flights
      Throws:
      FarePriceException - the fare price exception
    • createFareRestriction

      protected FareRestriction createFareRestriction(OriginDestinationGroup originDestinationGroup, OriginDestinationGroupData originDestinationGroupData, List<SelectedFareData> selectedFareDataList, Set<PassengerType> passengerTypes, Set<PassengerGroup> passengerGroups, List<PassengerData> passengers, int originDestinationGroupId) throws FarePriceException
      Creates a fare restriction from the selected fare. For each selected fare, this method finds the origin destination group having the same group of flight, in order to populate the fare restriction.
      Parameters:
      originDestinationGroup - the origin destination group
      originDestinationGroupData - the origin destination group data
      selectedFareDataList - the selected fare data list
      passengerTypes - the passenger types
      passengerGroups - the passenger groups
      passengers - the passengers in the addSolutionRequestData
      originDestinationGroupId -
      Returns:
      the fare restriction
      Throws:
      FarePriceException - the fare price exception
    • createPassengers

      protected List<Passenger> createPassengers(List<SelectedPassengerFareData> selectedPassengerFareDataList, Set<PassengerType> passengerTypes, Set<PassengerGroup> passengerGroups, List<PassengerData> passengerDataList) throws FarePriceException
      Creates the list of passengers for a fare restriction.
      Parameters:
      selectedPassengerFareDataList - the selected passenger fare data list
      passengerTypes - the passenger types
      passengerGroups - the passenger groups
      passengerDataList - the passenger data list
      Returns:
      the list
      Throws:
      FarePriceException - the fare price exception if an error occurs during the creation of a passenger.
    • getProsTransportOfferingFacade

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

      public void setProsTransportOfferingFacade(PROSTransportOfferingFacade prosTransportOfferingFacade)
    • getPassengerCodeToPaxTypeMapping

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

      public void setPassengerCodeToPaxTypeMapping(Map<String,String> passengerCodeToPaxTypeMapping)