Class DefaultNDCMerchandisingRequestOriginDestinationHandler
java.lang.Object
de.hybris.platform.ndc182prosfacades.facades.servicelist.handlers.impl.DefaultNDCMerchandisingRequestOriginDestinationHandler
- All Implemented Interfaces:
NDCMerchandisingRequestHandler
public class DefaultNDCMerchandisingRequestOriginDestinationHandler
extends Object
implements NDCMerchandisingRequestHandler
The NDC implementation of
MerchandisingRequestHandler interface. This class populates the list of originDestinations of
the merchandising request.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<BookingCode>createBookingCodes(TransportOfferingHandlerData transportOfferingHandlerData, Map<Integer, String> passengerTypeMap, List<OfferItemSegmentHandlerData> offerItemSegmentHandlerData) Creates the list of booking codes.protected LinkedHashSet<MerchandisingFlight>createFlights(Set<TransportOfferingHandlerData> transportOfferings, Map<Integer, String> passengerTypeMap, List<OfferItemSegmentHandlerData> offerItemSegmentHandlerData, int startingId) Creates the set of flights from the order entries having the same originDestinationRefNumber.protected LinkedHashSet<OriginDestination>createOriginDestinations(ShoppingMerchandisingHandlerData shoppingMerchandisingHandlerData) Creates the origin destinations set.protected List<OfferItemSegmentHandlerData>getOfferItemSegmentHandlerDataList(TransportOfferingHandlerData transportOfferingHandlerData, List<OfferItemSegmentHandlerData> offerItemSegmentHandlerDataList) Get OfferItemSegmentHandlerDatavoidhandle(MerchandisingRequest merchandisingRequest, ShoppingMerchandisingHandlerData shoppingMerchandisingHandlerData) This handler populate the list of origin destinations from the shoppingMerchandisingHandlerData.protected intpopulateOriginDestinations(ShoppingMerchandisingHandlerData shoppingMerchandisingHandlerData, Set<TransportOfferingHandlerData> filteredTransportOfferings, LinkedHashSet<OriginDestination> originDestinations, int startingId) Creates an origin destination from each originDestinationRefNumber in the cart and populates the originDestination set with them.
-
Constructor Details
-
DefaultNDCMerchandisingRequestOriginDestinationHandler
public DefaultNDCMerchandisingRequestOriginDestinationHandler()
-
-
Method Details
-
handle
public void handle(MerchandisingRequest merchandisingRequest, ShoppingMerchandisingHandlerData shoppingMerchandisingHandlerData) This handler populate the list of origin destinations from the shoppingMerchandisingHandlerData.- Specified by:
handlein interfaceNDCMerchandisingRequestHandler- Parameters:
merchandisingRequest- the merchandisingRequestshoppingMerchandisingHandlerData- the shoppingMerchandisingHandlerData
-
createOriginDestinations
protected LinkedHashSet<OriginDestination> createOriginDestinations(ShoppingMerchandisingHandlerData shoppingMerchandisingHandlerData) Creates the origin destinations set.- Parameters:
shoppingMerchandisingHandlerData- the shoppingMerchandisingHandlerData- Returns:
- the OriginDestination set.
-
populateOriginDestinations
protected int populateOriginDestinations(ShoppingMerchandisingHandlerData shoppingMerchandisingHandlerData, Set<TransportOfferingHandlerData> filteredTransportOfferings, LinkedHashSet<OriginDestination> originDestinations, int startingId) Creates an origin destination from each originDestinationRefNumber in the cart and populates the originDestination set with them.- Parameters:
shoppingMerchandisingHandlerData- the shoppingMerchandisingHandlerDatafilteredTransportOfferings- the transport offerint filtered by originDestinationRefNumberoriginDestinations- the originDestinationsstartingId- the starting flightID
-
createFlights
protected LinkedHashSet<MerchandisingFlight> createFlights(Set<TransportOfferingHandlerData> transportOfferings, Map<Integer, String> passengerTypeMap, List<OfferItemSegmentHandlerData> offerItemSegmentHandlerData, int startingId) Creates the set of flights from the order entries having the same originDestinationRefNumber.- Parameters:
transportOfferings- the transport offeringspassengerTypeMap- the passengerTypeMapofferItemSegmentHandlerData- the offerItemSegmentHandlerDatastartingId- the startingId- Returns:
- the linked hash set
-
createBookingCodes
protected List<BookingCode> createBookingCodes(TransportOfferingHandlerData transportOfferingHandlerData, Map<Integer, String> passengerTypeMap, List<OfferItemSegmentHandlerData> offerItemSegmentHandlerData) Creates the list of booking codes.- Parameters:
transportOfferingHandlerData- the pros search responsepassengerTypeMap- the passenger type mapofferItemSegmentHandlerData- the offerItemSegmentHandlerData- Returns:
- the booking code list
-
getOfferItemSegmentHandlerDataList
protected List<OfferItemSegmentHandlerData> getOfferItemSegmentHandlerDataList(TransportOfferingHandlerData transportOfferingHandlerData, List<OfferItemSegmentHandlerData> offerItemSegmentHandlerDataList) Get OfferItemSegmentHandlerData- Parameters:
transportOfferingHandlerData- the transportOfferingHandlerDataofferItemSegmentHandlerDataList- the offerItemSegmentHandlerDataList- Returns:
- OfferItemSegmentHandlerData
-