Class DefaultMerchandisingResponseAncillaryDataHandler
java.lang.Object
de.hybris.platform.prosfacades.ancillary.search.handlers.impl.AbstractMerchandisingResponseHandler
de.hybris.platform.prosfacades.ancillary.search.handlers.impl.DefaultMerchandisingResponseAncillaryDataHandler
- All Implemented Interfaces:
MerchandisingResponseHandler
- Direct Known Subclasses:
DefaultNDCMerchandisingResponseAncillaryDataHandler
public class DefaultMerchandisingResponseAncillaryDataHandler
extends AbstractMerchandisingResponseHandler
implements MerchandisingResponseHandler
The Pros implementation of
MerchandisingResponseHandler interface. This class populates the ancillary data from the
merchandising response message.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<AncillaryData>createAncillaries(MerchandisingResponse merchandisingResponse, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, List<TravellerModel> passengers) Creates the list of ancillaries from the merchandising response.protected List<AncillaryPricingInfoData>createPricingInfos(OptionalService optionalService, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, Set<Integer> flightIds, List<TravellerModel> travellers) Creates the pricing infos list.protected PROSTravelAncillaryServiceGets pros travel ancillary service.protected ShoppingTravelAncillaryServiceGets shopping travel ancillary service.voidhandle(AncillaryResponseData ancillaryResponseData, List<String> transportOfferingCodes, MerchandisingResponse merchandisingResponse, Map<Integer, String> passengerIdTypeMap, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, List<TravellerModel> passengers) Populates the ancillary data from the merchandising response message.protected voidpopulateAncillaryDataList(OptionalService optionalService, ShoppingAncillaryProductModel ancillaryProduct, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, Set<Integer> flightIds, List<AncillaryData> ancillaryDataList, List<TravellerModel> passengers) Creates an ancillary data from an optional service.voidsetProsTravelAncillaryService(PROSTravelAncillaryService prosTravelAncillaryService) Sets pros travel ancillary service.voidsetShoppingTravelAncillaryService(ShoppingTravelAncillaryService shoppingTravelAncillaryService) Sets shopping travel ancillary service.Methods inherited from class de.hybris.platform.prosfacades.ancillary.search.handlers.impl.AbstractMerchandisingResponseHandler
createBasePrice, createCategories, createFlightCodes, createOriginDestination, createOriginDestinations, createPassengers, createPriceInfo, createTaxes, getCategoryConverter, getProsTransportOfferingFacade, getShoppingTravelStockService, getTransportOfferingService, getTravelCommercePriceFacade, isProductAvailable, populatePassenger, resolvePassenger, setCategoryConverter, setProsTransportOfferingFacade, setShoppingTravelStockService, setTransportOfferingService, setTravelCommercePriceFacade
-
Constructor Details
-
DefaultMerchandisingResponseAncillaryDataHandler
public DefaultMerchandisingResponseAncillaryDataHandler()
-
-
Method Details
-
handle
public void handle(AncillaryResponseData ancillaryResponseData, List<String> transportOfferingCodes, MerchandisingResponse merchandisingResponse, Map<Integer, String> passengerIdTypeMap, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, List<TravellerModel> passengers) Populates the ancillary data from the merchandising response message.- Specified by:
handlein interfaceMerchandisingResponseHandler- Parameters:
ancillaryResponseData- the ancillaryResponseDatatransportOfferingCodes- the transportOfferingCodesmerchandisingResponse- the merchandisingResponsepassengerIdTypeMap- the passengerIdTypeMapflightIdTransportOfferingMap- the flight Id transport Offering Mappassengers- the passengers
-
createAncillaries
protected List<AncillaryData> createAncillaries(MerchandisingResponse merchandisingResponse, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, List<TravellerModel> passengers) Creates the list of ancillaries from the merchandising response. Services will be filtered accordingly to the list of transport offerings. If the optional service contains a list of flight ids in the association, then the service is returned only if at least one the ids is contained in the flightIdTransportOfferingMap keySet. Otherwise, if the optional service contains a list of origin destination ids in the association, then the service is returned only if all the flights contained in the origin destinations are present in the keySet of the flightIdTransportOfferingMap.- Parameters:
merchandisingResponse- the merchandising responseflightIdTransportOfferingMap- the flightIdTransportOfferingMappassengers- the cart model- Returns:
- the list of ancillary data
-
populateAncillaryDataList
protected void populateAncillaryDataList(OptionalService optionalService, ShoppingAncillaryProductModel ancillaryProduct, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, Set<Integer> flightIds, List<AncillaryData> ancillaryDataList, List<TravellerModel> passengers) Creates an ancillary data from an optional service.- Parameters:
optionalService- the optional serviceflightIdTransportOfferingMap- the flight id transport offering mapflightIds- the flight idsancillaryDataList- the ancillary data listpassengers- the offersRequest
-
createPricingInfos
protected List<AncillaryPricingInfoData> createPricingInfos(OptionalService optionalService, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, Set<Integer> flightIds, List<TravellerModel> travellers) Creates the pricing infos list.- Parameters:
optionalService- the optional serviceflightIdTransportOfferingMap- the flight id transport offering mapflightIds- the flight idstravellers- the travellers- Returns:
- the list
-
getProsTravelAncillaryService
Gets pros travel ancillary service.- Returns:
- the pros travel ancillary service
-
setProsTravelAncillaryService
Sets pros travel ancillary service.- Parameters:
prosTravelAncillaryService- the pros travel ancillary service
-
getShoppingTravelAncillaryService
Gets shopping travel ancillary service.- Returns:
- the shopping travel ancillary service
-
setShoppingTravelAncillaryService
public void setShoppingTravelAncillaryService(ShoppingTravelAncillaryService shoppingTravelAncillaryService) Sets shopping travel ancillary service.- Parameters:
shoppingTravelAncillaryService- the shopping travel ancillary service
-