Class DefaultIntelliPricerPassengerTypeGroupHandler

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

public class DefaultIntelliPricerPassengerTypeGroupHandler extends Object implements IntelliPricerRequestHandler
The implementation of IntelliPricerRequestHandler interface. This class populates the passenger type and group lists.
  • Constructor Details

    • DefaultIntelliPricerPassengerTypeGroupHandler

      public DefaultIntelliPricerPassengerTypeGroupHandler()
  • Method Details

    • handle

      public void handle(AddSolutionRequestData addSolutionRequestData, IntelliPricerRequest intelliPricerRequest) throws FarePriceException
      Creates the list of passenger types and groups from the passenger list.
      Specified by:
      handle in interface IntelliPricerRequestHandler
      Parameters:
      addSolutionRequestData - the addSolutionRequestData
      intelliPricerRequest - the intelliPricerRequest
      Throws:
      FarePriceException
    • createPassengerGroups

      protected LinkedHashSet<PassengerGroup> createPassengerGroups(List<PassengerData> passengerDataList, Map<String,Integer> paxTypeIdMap)
      Create passenger groups set.
      Parameters:
      passengerDataList - the passenger data list
      paxTypeIdMap - the pax type id map
      Returns:
      the set of passenger groups/
    • createPassengerTypes

      protected LinkedHashSet<PassengerType> createPassengerTypes(List<PassengerData> passengerDataList, Map<String,Integer> paxTypeIdMap) throws FarePriceException
      Creates the passenger types set from a passenger data. For each distinct type of passenger, an entry (ptcCode,passengerTypeId) is added into the paxTypeIdMap, in order to create the passenger groups.
      Parameters:
      passengerDataList - the passenger data list
      paxTypeIdMap - the pax type id map
      Returns:
      the set of passenger types
      Throws:
      FarePriceException - the fare price exception if an error occurs during the creation of a passenger type.
    • createPassengerType

      protected PassengerType createPassengerType(String ptcCode, int passengerTypeId) throws FarePriceException
      Creates a passenger type.
      Parameters:
      ptcCode - the ptc code
      passengerTypeId - the passenger type id
      Returns:
      the passenger type
      Throws:
      FarePriceException - the fare price exception if the passeger type is not a valid type for the intelliPricerRequest.
    • 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)
      Sets passenger code to pax type mapping.
      Parameters:
      passengerCodeToPaxTypeMapping - the passenger code to pax type mapping