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 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:
      handle in interface NDCMerchandisingRequestHandler
      Parameters:
      merchandisingRequest - the merchandisingRequest
      shoppingMerchandisingHandlerData - 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 shoppingMerchandisingHandlerData
      filteredTransportOfferings - the transport offerint filtered by originDestinationRefNumber
      originDestinations - the originDestinations
      startingId - 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 offerings
      passengerTypeMap - the passengerTypeMap
      offerItemSegmentHandlerData - the offerItemSegmentHandlerData
      startingId - 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 response
      passengerTypeMap - the passenger type map
      offerItemSegmentHandlerData - the offerItemSegmentHandlerData
      Returns:
      the booking code list
    • getOfferItemSegmentHandlerDataList

      protected List<OfferItemSegmentHandlerData> getOfferItemSegmentHandlerDataList(TransportOfferingHandlerData transportOfferingHandlerData, List<OfferItemSegmentHandlerData> offerItemSegmentHandlerDataList)
      Get OfferItemSegmentHandlerData
      Parameters:
      transportOfferingHandlerData - the transportOfferingHandlerData
      offerItemSegmentHandlerDataList - the offerItemSegmentHandlerDataList
      Returns:
      OfferItemSegmentHandlerData