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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FareRestrictioncreateFareRestriction(OriginDestinationGroup originDestinationGroup, OriginDestinationGroupData originDestinationGroupData, List<SelectedFareData> selectedFareDataList, Set<PassengerType> passengerTypes, Set<PassengerGroup> passengerGroups, List<PassengerData> passengers, int originDestinationGroupId) Creates a fare restriction from the selected fare.createFlights(List<SelectedFlightData> selectedFlightDataList, Set<OriginDestinationGroup> originDestinationGroups) Creates a list of flights from the selectedFlightData list.protected OriginDestinationGroupcreateOriginDestinationGroup(OriginDestinationGroupData originDestinationGroupData, IntelliPricerRequest intelliPricerRequest, AddSolutionRequestData addSolutionRequestData, List<FareRestriction> fareRestrictions, Set<OriginDestinationGroup> originDestinationGroups, int originDestinationGroupId) Creates an origin destination group.protected voidcreateOriginDestinationGroups(AddSolutionRequestData addSolutionRequestData, IntelliPricerRequest intelliPricerRequest) Creates the list of origin destination group and fare restrictions from an addSolutionRequestData.createPassengers(List<SelectedPassengerFareData> selectedPassengerFareDataList, Set<PassengerType> passengerTypes, Set<PassengerGroup> passengerGroups, List<PassengerData> passengerDataList) Creates the list of passengers for a fare restriction.Gets passenger code to pax type mapping.protected PROSTransportOfferingFacadeGets pros transport offering facade.voidhandle(AddSolutionRequestData addSolutionRequestData, IntelliPricerRequest intelliPricerRequest) This handler takes the list of originDestinationGroupData from the addSolutionRequestData and creates the respective originDestinationGroup and fare restriction for the intelliPricerRequest.voidsetPassengerCodeToPaxTypeMapping(Map<String, String> passengerCodeToPaxTypeMapping) voidsetProsTransportOfferingFacade(PROSTransportOfferingFacade prosTransportOfferingFacade)
-
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:
handlein interfaceIntelliPricerRequestHandler- Parameters:
addSolutionRequestData- the addSolutionRequestDataintelliPricerRequest- 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 dataintelliPricerRequest- 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 dataintelliPricerRequest- the intelli pricer requestaddSolutionRequestData- the add solution request datafareRestrictions- the fare restrictionsoriginDestinationGroups- the origin destination groupsoriginDestinationGroupId- 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 listoriginDestinationGroups- 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 grouporiginDestinationGroupData- the origin destination group dataselectedFareDataList- the selected fare data listpassengerTypes- the passenger typespassengerGroups- the passenger groupspassengers- the passengers in the addSolutionRequestDataoriginDestinationGroupId-- 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 listpassengerTypes- the passenger typespassengerGroups- the passenger groupspassengerDataList- the passenger data list- Returns:
- the list
- Throws:
FarePriceException- the fare price exception if an error occurs during the creation of a passenger.
-
getProsTransportOfferingFacade
Gets pros transport offering facade.- Returns:
- the pros transport offering facade
-
setProsTransportOfferingFacade
-
getPassengerCodeToPaxTypeMapping
Gets passenger code to pax type mapping.- Returns:
- the passenger code to pax type mapping
-
setPassengerCodeToPaxTypeMapping
-