Class DefaultMerchandisingBaggageDataHandler

java.lang.Object
de.hybris.platform.prosfacades.ancillary.search.handlers.impl.AbstractMerchandisingResponseHandler
de.hybris.platform.prosfacades.ancillary.search.handlers.impl.DefaultMerchandisingBaggageDataHandler
All Implemented Interfaces:
MerchandisingBaggageHandler

public class DefaultMerchandisingBaggageDataHandler extends AbstractMerchandisingResponseHandler implements MerchandisingBaggageHandler
The Pros implementation of MerchandisingBaggageHandler interface. This class populates the baggage data from the merchandising response message.
  • Constructor Details

    • DefaultMerchandisingBaggageDataHandler

      public DefaultMerchandisingBaggageDataHandler()
  • Method Details

    • handle

      public void handle(BaggageResponseData baggageResponseData, List<String> transportOfferingCodes, MerchandisingResponse merchandisingResponse, Map<Integer,String> passengerIdTypeMap, Map<Integer,TransportOfferingData> flightIdTransportOfferingMap, List<TravellerModel> passengers)
      Populates the baggage data from the merchandising response message.
      Specified by:
      handle in interface MerchandisingBaggageHandler
      Parameters:
      baggageResponseData - the baggageResponseData
      transportOfferingCodes - the transportOfferingCodes
      merchandisingResponse - the merchandisingResponse
      passengerIdTypeMap - the passengerIdTypeMap
      flightIdTransportOfferingMap - the flightIdTransportOfferingMap
      passengers - the passengers
    • createBaggages

      protected List<BaggageData> createBaggages(MerchandisingResponse merchandisingResponse, Map<Integer,TransportOfferingData> flightIdTransportOfferingMap, List<TravellerModel> passengers)
      Creates the list of baggages from the merchandising response. Charges baggages will be filtered accordingly to the list of transport offerings. If the charged baggage contains a list of flight ids in the association, then the baggage is returned only if at least one the ids is contained in the flightIdTransportOfferingMap keySet. Otherwise, if the charged baggage contains a list of origin destination ids in the association, then the baggage 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 passengers
      Returns:
      the list of baggage data
    • populateBaggageDataList

      protected void populateBaggageDataList(Charge chargedBaggage, ShoppingBaggageProductModel baggageProductModel, Map<Integer,TransportOfferingData> flightIdTransportOfferingMap, Set<Integer> flightIds, List<BaggageData> baggageDataList, List<TravellerModel> passengers)
      Creates an baggage data from a charged baggage.
      Parameters:
      chargedBaggage - the charged baggage
      baggageProductModel - the baggage product model
      flightIdTransportOfferingMap - the flight id transport offering map
      flightIds - the flight ids
      baggageDataList - the baggage data list
      passengers - the offers request
    • createPricingInfos

      protected List<AncillaryPricingInfoData> createPricingInfos(Charge chargedBaggage, Map<Integer,TransportOfferingData> flightIdTransportOfferingMap, Set<Integer> flightIds, List<TravellerModel> passengers)
      Creates the pricing infos list.
      Parameters:
      chargedBaggage - the charged baggage
      flightIdTransportOfferingMap - the flight id transport offering map
      flightIds - the flight ids
      passengers - the passengers
      Returns:
      the list of ancillaryPricingInfoData
    • 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