Class AbstractMerchandisingResponseHandler
java.lang.Object
de.hybris.platform.prosfacades.ancillary.search.handlers.impl.AbstractMerchandisingResponseHandler
- Direct Known Subclasses:
DefaultMerchandisingBaggageDataHandler,DefaultMerchandisingBaggageOriginDestinationDataHandler,DefaultMerchandisingBaggagePassengerDataHandler,DefaultMerchandisingResponseAncillaryDataHandler,DefaultMerchandisingResponseOriginDestinationDataHandler,DefaultMerchandisingResponsePassengerDataHandler,DefaultNDCMerchandisingBaggageHandler
The Pros abstract class for populating the common fields between the ancillaryResponseData and the baggageResponseData.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PriceDatacreateBasePrice(Double base, String currency) Creates a base price.protected List<OfferGroupData>createCategories(Collection<CategoryModel> superCategories) Convert each category of the shopping ancillary product into an offer group data.createFlightCodes(Set<Integer> flightIds, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap) Creates the transport offering code list.protected OriginDestinationDatacreateOriginDestination(OriginDestinationResponse originDestination, List<MerchandisingFlight> flights, int originDestinationId, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, List<String> transportOfferingCodes) Creates an origin destination data.protected List<OriginDestinationData>createOriginDestinations(MerchandisingResponse merchandisingResponse, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, List<String> transportOfferingCodes) Creates origin destinations list from the merchandising response.protected List<PassengerData>createPassengers(Map<Integer, String> passengerIdTypeMap, List<TravellerModel> passengers) Creates the passengers from the merchandisingResponse.protected AncillaryPricingInfoDatacreatePriceInfo(PriceInfo priceInfo, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, Set<Integer> flightIds, List<TravellerModel> travellers) Creates the price info from the optional service.createTaxes(Double taxes, String currency) Creates a list of taxes.protected de.hybris.platform.servicelayer.dto.converter.Converter<CategoryModel,OfferGroupData> Gets category converter.protected PROSTransportOfferingFacadeGets pros transport offering facade.protected ShoppingTravelStockServiceGets shopping travel stock service.protected TransportOfferingServiceGets the transport offering service.protected TravelCommercePriceFacadeGets travel commerce price facade.protected booleanisProductAvailable(ProductModel productModel, Map<Integer, TransportOfferingData> transportOfferingMap) protected voidpopulatePassenger(TravellerModel source, PassengerData target) Populates passenger data.protected Optional<TravellerModel>resolvePassenger(List<TravellerModel> passengers, Integer id) Resolves passenger by given id.voidsetCategoryConverter(de.hybris.platform.servicelayer.dto.converter.Converter<CategoryModel, OfferGroupData> categoryConverter) Sets category converter.voidsetProsTransportOfferingFacade(PROSTransportOfferingFacade prosTransportOfferingFacade) Sets pros transport offering facade.voidsetShoppingTravelStockService(ShoppingTravelStockService shoppingTravelStockService) Sets shopping travel stock service.voidsetTransportOfferingService(TransportOfferingService transportOfferingService) Sets the transport offering service.voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Sets travel commerce price facade.
-
Constructor Details
-
AbstractMerchandisingResponseHandler
public AbstractMerchandisingResponseHandler()
-
-
Method Details
-
createPassengers
protected List<PassengerData> createPassengers(Map<Integer, String> passengerIdTypeMap, List<TravellerModel> passengers) Creates the passengers from the merchandisingResponse.- Parameters:
passengerIdTypeMap- the passenger id type mappassengers- the passengers- Returns:
- the list of passenger data
-
populatePassenger
Populates passenger data.- Parameters:
source- the sourcetarget- the target
-
resolvePassenger
Resolves passenger by given id.- Parameters:
passengers- the passengersid- the identifier- Returns:
- the passenger
-
createOriginDestinations
protected List<OriginDestinationData> createOriginDestinations(MerchandisingResponse merchandisingResponse, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, List<String> transportOfferingCodes) Creates origin destinations list from the merchandising response.- Parameters:
merchandisingResponse- the merchandising responseflightIdTransportOfferingMap- the flight id transport offering maptransportOfferingCodes- the transportOfferingCodes- Returns:
- the list of origin destination data
-
createOriginDestination
protected OriginDestinationData createOriginDestination(OriginDestinationResponse originDestination, List<MerchandisingFlight> flights, int originDestinationId, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, List<String> transportOfferingCodes) Creates an origin destination data.- Parameters:
originDestination- the origin destinationflights- the flightsoriginDestinationId- the originDestinationIdflightIdTransportOfferingMap- the flight id transport offering maptransportOfferingCodes- the transport offering codes- Returns:
- the origin destination data
-
createPriceInfo
protected AncillaryPricingInfoData createPriceInfo(PriceInfo priceInfo, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap, Set<Integer> flightIds, List<TravellerModel> travellers) Creates the price info from the optional service.- Parameters:
priceInfo- the price infoflightIdTransportOfferingMap- the flight id transport offering mapflightIds- the flight idstravellers- the travellers- Returns:
- the ancillary pricing info data
-
createTaxes
Creates a list of taxes.- Parameters:
taxes- the taxescurrency- the currency- Returns:
- the list
-
createBasePrice
Creates a base price.- Parameters:
base- the basecurrency- the currency- Returns:
- the price data
-
createFlightCodes
protected List<String> createFlightCodes(Set<Integer> flightIds, Map<Integer, TransportOfferingData> flightIdTransportOfferingMap) Creates the transport offering code list.- Parameters:
flightIds- the flight idsflightIdTransportOfferingMap- the flight id transport offering map- Returns:
- the list
-
createCategories
Convert each category of the shopping ancillary product into an offer group data.- Parameters:
superCategories- the superCategories- Returns:
- the list of offer group data
-
isProductAvailable
protected boolean isProductAvailable(ProductModel productModel, Map<Integer, TransportOfferingData> transportOfferingMap) -
getProsTransportOfferingFacade
Gets pros transport offering facade.- Returns:
- the pros transport offering facade
-
setProsTransportOfferingFacade
Sets pros transport offering facade.- Parameters:
prosTransportOfferingFacade- the pros transport offering facade
-
getCategoryConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<CategoryModel,OfferGroupData> getCategoryConverter()Gets category converter.- Returns:
- the category converter
-
setCategoryConverter
public void setCategoryConverter(de.hybris.platform.servicelayer.dto.converter.Converter<CategoryModel, OfferGroupData> categoryConverter) Sets category converter.- Parameters:
categoryConverter- the category converter
-
getTravelCommercePriceFacade
Gets travel commerce price facade.- Returns:
- the travel commerce price facade
-
setTravelCommercePriceFacade
Sets travel commerce price facade.- Parameters:
travelCommercePriceFacade- the travel commerce price facade
-
getTransportOfferingService
Gets the transport offering service.- Returns:
- the transport offering service
-
setTransportOfferingService
Sets the transport offering service.- Parameters:
transportOfferingService- the transport offering service
-
getShoppingTravelStockService
Gets shopping travel stock service.- Returns:
- the shopping travel stock service
-
setShoppingTravelStockService
Sets shopping travel stock service.- Parameters:
shoppingTravelStockService- the shopping travel stock service
-