Class ItineraryHandler
java.lang.Object
de.hybris.platform.travelfacades.fare.search.handlers.impl.ItineraryHandler
- All Implemented Interfaces:
FareSearchHandler
Concrete implementation of the
FareSearchHandler interface. Handler is responsible for
populating the List of PricedItineraryData on FareSelectionData-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ItineraryDatacreateItineraryData(FareSearchRequestData fareSearchRequestData, ScheduledRouteData scheduledRoute) Method sets the parameters on a new ItineraryData object and returns itprotected List<OriginDestinationOptionData>createOriginDestinationOptionData(ScheduledRouteData scheduledRoute) Method takes the Transport Offering from the Scheduled Route and sets it on a new instance of Origin Destination Option.protected PricedItineraryDatacreatePricedItineraryData(FareSearchRequestData fareSearchRequestData, int pricedItineraryId, ScheduledRouteData scheduledRoute) Method sets the parameters on a new PricedItineraryData object and returns itvoidhandle(List<ScheduledRouteData> scheduledRoutes, FareSearchRequestData fareSearchRequestData, FareSelectionData fareSelectionData) Method takesListofScheduledRouteDataand generates aListofPricedItineraryDatafor eachScheduledRouteData.protected List<PricedItineraryData>populateItineraryInformations(List<ScheduledRouteData> scheduledRoutes, List<PricedItineraryData> pricedItineraries, FareSearchRequestData fareSearchRequestData) Method takes a list of Scheduled Routes and creates a list of Priced Itineraries.
-
Constructor Details
-
ItineraryHandler
public ItineraryHandler()
-
-
Method Details
-
handle
public void handle(List<ScheduledRouteData> scheduledRoutes, FareSearchRequestData fareSearchRequestData, FareSelectionData fareSelectionData) Method takesListofScheduledRouteDataand generates aListofPricedItineraryDatafor eachScheduledRouteData. The method does not require theFareSearchRequestDataobject and so null reference can be used instead.- Specified by:
handlein interfaceFareSearchHandler- Parameters:
scheduledRoutes- theListofScheduledRouteDataobject which will be used to create aListofPricedItineraryData.fareSearchRequestData- not required for this populator.fareSelectionData- theFareSearchRequestDataobject where theListofPricedItineraryDatawill be set.
-
populateItineraryInformations
protected List<PricedItineraryData> populateItineraryInformations(List<ScheduledRouteData> scheduledRoutes, List<PricedItineraryData> pricedItineraries, FareSearchRequestData fareSearchRequestData) Method takes a list of Scheduled Routes and creates a list of Priced Itineraries.- Parameters:
scheduledRoutes- the scheduled routespricedItineraries- the priced itinerariesfareSearchRequestData- the fare search request data- Returns:
- List
list
-
createPricedItineraryData
protected PricedItineraryData createPricedItineraryData(FareSearchRequestData fareSearchRequestData, int pricedItineraryId, ScheduledRouteData scheduledRoute) Method sets the parameters on a new PricedItineraryData object and returns it- Parameters:
fareSearchRequestData- the fare search request datapricedItineraryId- the priced itinerary idscheduledRoute- the scheduled route- Returns:
- PricedItineraryData priced itinerary data
-
createItineraryData
protected ItineraryData createItineraryData(FareSearchRequestData fareSearchRequestData, ScheduledRouteData scheduledRoute) Method sets the parameters on a new ItineraryData object and returns it- Parameters:
fareSearchRequestData- the fare search request datascheduledRoute- the scheduled route- Returns:
- ItineraryData itinerary data
-
createOriginDestinationOptionData
protected List<OriginDestinationOptionData> createOriginDestinationOptionData(ScheduledRouteData scheduledRoute) Method takes the Transport Offering from the Scheduled Route and sets it on a new instance of Origin Destination Option. The method then creates a list of Origin Destination Options and adds the newly created OriginDestinationOption to the list before return the list.- Parameters:
scheduledRoute- the scheduled route- Returns:
- List
list
-