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 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:
      handle in interface MerchandisingResponseHandler
      Parameters:
      ancillaryResponseData - the ancillaryResponseData
      transportOfferingCodes - the transportOfferingCodes
      merchandisingResponse - the merchandisingResponse
      passengerIdTypeMap - the passengerIdTypeMap
      flightIdTransportOfferingMap - the flight Id transport Offering Map
      passengers - 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 response
      flightIdTransportOfferingMap - the flightIdTransportOfferingMap
      passengers - 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 service
      flightIdTransportOfferingMap - the flight id transport offering map
      flightIds - the flight ids
      ancillaryDataList - the ancillary data list
      passengers - 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 service
      flightIdTransportOfferingMap - the flight id transport offering map
      flightIds - the flight ids
      travellers - the travellers
      Returns:
      the list
    • getProsTravelAncillaryService

      protected PROSTravelAncillaryService getProsTravelAncillaryService()
      Gets pros travel ancillary service.
      Returns:
      the pros travel ancillary service
    • setProsTravelAncillaryService

      public void setProsTravelAncillaryService(PROSTravelAncillaryService prosTravelAncillaryService)
      Sets pros travel ancillary service.
      Parameters:
      prosTravelAncillaryService - the pros travel ancillary service
    • getShoppingTravelAncillaryService

      protected ShoppingTravelAncillaryService 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