Class ShoppingDealPricedItineraryBundleHandler
java.lang.Object
de.hybris.platform.shoppingfacades.fare.search.handlers.impl.ShoppingDealPricedItineraryBundleHandler
- All Implemented Interfaces:
ShoppingFareSearchHandler
public class ShoppingDealPricedItineraryBundleHandler
extends Object
implements ShoppingFareSearchHandler
handler to price the deals in the itinerary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.enumeration.EnumerationServiceGets enumeration service.protected List<ItineraryPricingInfoData>getItineraryPricingInfos(DealOriginDestinationInfoData dealOriginDestinationInfoData, List<TransportOfferingData> transportOfferings) Returns the list of ItineraryPricingInfoData populated from the BundleTemplate corresponding to the id specified in the DealOriginDestinationInfoDataprotected List<TransportOfferingData>getTransportOfferings(PricedItineraryData pricedItinerary) Returns the list of TransportOfferingDatas from the given PricedItinerary.protected de.hybris.platform.servicelayer.dto.converter.Converter<BundleTemplateModel,TravelBundleTemplateData> Gets travel bundle template converter.protected TravelBundleTemplateServiceGets travel bundle template service.voidhandle(SearchResponseMessage searchResponseMessage, FareShopMessage fareShopMessage, FareSearchRequestData fareSearchRequestData, FareSelectionData fareSelectionData) Handle methodprotected voidpopulateItineraryPricingInformations(PricedItineraryData pricedItinerary, DealOriginDestinationInfoData dealOriginDestinationInfoData) Populates the ItineraryPricingInfo for each pricedItinerary, using the RouteBundleTemplate correponding to the id specified in the dealOriginDestinationInfoData.protected voidpopulateItineraryPricingInfosFromBundle(BundleTemplateModel bundleTemplateModel, List<TransportOfferingData> transportOfferings, List<ItineraryPricingInfoData> itineraryPricingInfoDatas) Populates the list of itineraryPricingInfoDatas from the given bundleTemplateModel and transportOfferingsvoidsetEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService) Sets enumeration service.protected voidsetItineraryPricingInfoAvailability(List<ItineraryPricingInfoData> itineraryPricingInfoDatas) Sets the availability of the ItineraryPricingInfoData.voidsetTravelBundleTemplateConverter(de.hybris.platform.servicelayer.dto.converter.Converter<BundleTemplateModel, TravelBundleTemplateData> travelBundleTemplateConverter) Sets travel bundle template converter.voidsetTravelBundleTemplateService(TravelBundleTemplateService travelBundleTemplateService) Sets travel bundle template service.
-
Constructor Details
-
ShoppingDealPricedItineraryBundleHandler
public ShoppingDealPricedItineraryBundleHandler()
-
-
Method Details
-
handle
public void handle(SearchResponseMessage searchResponseMessage, FareShopMessage fareShopMessage, FareSearchRequestData fareSearchRequestData, FareSelectionData fareSelectionData) Description copied from interface:ShoppingFareSearchHandlerHandle method- Specified by:
handlein interfaceShoppingFareSearchHandler- Parameters:
searchResponseMessage- the search response messagefareShopMessage- the fare shop messagefareSearchRequestData- the fare search request datafareSelectionData- the fare selection data
-
populateItineraryPricingInformations
protected void populateItineraryPricingInformations(PricedItineraryData pricedItinerary, DealOriginDestinationInfoData dealOriginDestinationInfoData) Populates the ItineraryPricingInfo for each pricedItinerary, using the RouteBundleTemplate correponding to the id specified in the dealOriginDestinationInfoData.- Parameters:
pricedItinerary- the pricedItinerarydealOriginDestinationInfoData- the dealOriginDestinationInfoData
-
getItineraryPricingInfos
protected List<ItineraryPricingInfoData> getItineraryPricingInfos(DealOriginDestinationInfoData dealOriginDestinationInfoData, List<TransportOfferingData> transportOfferings) Returns the list of ItineraryPricingInfoData populated from the BundleTemplate corresponding to the id specified in the DealOriginDestinationInfoData- Parameters:
dealOriginDestinationInfoData- as the dealOriginDestinationInfoDatatransportOfferings- as the transportOfferings- Returns:
- a list of ItineraryPricingInfoData
-
populateItineraryPricingInfosFromBundle
protected void populateItineraryPricingInfosFromBundle(BundleTemplateModel bundleTemplateModel, List<TransportOfferingData> transportOfferings, List<ItineraryPricingInfoData> itineraryPricingInfoDatas) Populates the list of itineraryPricingInfoDatas from the given bundleTemplateModel and transportOfferings- Parameters:
bundleTemplateModel- as the bundleTemplateModeltransportOfferings- as the list of transportOfferingsitineraryPricingInfoDatas-
-
setItineraryPricingInfoAvailability
protected void setItineraryPricingInfoAvailability(List<ItineraryPricingInfoData> itineraryPricingInfoDatas) Sets the availability of the ItineraryPricingInfoData. An itineraryPricingInfo is unavailable if no bundles are populated- Parameters:
itineraryPricingInfoDatas- as the itineraryPricingInfoDatas
-
getTransportOfferings
Returns the list of TransportOfferingDatas from the given PricedItinerary. The method gets the ItineraryData from the pricedItinerary and then gets a list of OriginDestinationOption from the Itinerary object. An empty list if return if the list if empty otherwise a list of Transport Offerings is returned.- Parameters:
pricedItinerary- as the pricedItinerary- Returns:
- a list of TransportOfferingData
-
getTravelBundleTemplateConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<BundleTemplateModel,TravelBundleTemplateData> getTravelBundleTemplateConverter()Gets travel bundle template converter.- Returns:
- the travel bundle template converter
-
setTravelBundleTemplateConverter
public void setTravelBundleTemplateConverter(de.hybris.platform.servicelayer.dto.converter.Converter<BundleTemplateModel, TravelBundleTemplateData> travelBundleTemplateConverter) Sets travel bundle template converter.- Parameters:
travelBundleTemplateConverter- the travel bundle template converter
-
getEnumerationService
protected de.hybris.platform.enumeration.EnumerationService getEnumerationService()Gets enumeration service.- Returns:
- the enumeration service
-
setEnumerationService
public void setEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService) Sets enumeration service.- Parameters:
enumerationService- the enumeration service
-
getTravelBundleTemplateService
Gets travel bundle template service.- Returns:
- the travel bundle template service
-
setTravelBundleTemplateService
Sets travel bundle template service.- Parameters:
travelBundleTemplateService- the travel bundle template service
-