Class ServiceListAlaCarteOffersHandler

java.lang.Object
de.hybris.platform.ndc182facades.facades.servicelist.handlers.impl.AbstractAlaCartOffersHandler
de.hybris.platform.ndc182facades.facades.servicelist.handlers.impl.ServiceListAlaCarteOffersHandler
All Implemented Interfaces:
ServiceListHandler<NDCCarrierOfferData>

public class ServiceListAlaCarteOffersHandler extends AbstractAlaCartOffersHandler implements ServiceListHandler<NDCCarrierOfferData>
The ndc implementation of ServiceListHandler interface to populate the alacarte offers fields.
  • Constructor Details

    • ServiceListAlaCarteOffersHandler

      public ServiceListAlaCarteOffersHandler()
  • Method Details

    • handle

      public void handle(NDCCarrierOfferData ndcOfferData, IATAServiceListRS serviceListRS, List<AbstractOrderEntryModel> selectedItems) throws NDCException
      Description copied from interface: ServiceListHandler
      Handles data from ndcOfferData to serviceListRS.
      Specified by:
      handle in interface ServiceListHandler<NDCCarrierOfferData>
      Parameters:
      ndcOfferData - the source
      serviceListRS - the serviceListRS
      selectedItems - the selectedEntries
      Throws:
      NDCException
    • createAlaCarteOfferItems

      protected List<ALaCarteOfferItemType> createAlaCarteOfferItems(List<NDCCarrierOfferItemData> offerItemIds) throws NDCException
      Creates ala carte offer items list. For each bundle in the offeritem, creates the offerRequestData and retrieves all the available ancillaries and all the ones which are already included in the bundle template. For the ones that are already included, checks the quantity and compares it with its travel restriction on the maximum quantity. If no the quantity is equal to the maximum allowed quantity, then the ancillary won't be listed in the alacarteoffer.
      Parameters:
      offerItemIds - the offer item ids
      Returns:
      the list
      Throws:
      NDCException
    • createAlaCarteOfferItemsFromOriginDestinationOfferInfoData

      protected List<ALaCarteOfferItemType> createAlaCarteOfferItemsFromOriginDestinationOfferInfoData(List<OriginDestinationOfferInfoData> originDestinationInfoDataList, Map<String,Integer> includedAncillaries, List<NDCPassengerData> passengers)
      This method filters the ancillaries by comparing the travellerMaxOfferQty restriction to the quantity of the ancillary that is included in the bundle.
      Parameters:
      originDestinationInfoDataList - the origin destination info data list
      includedAncillaries - the included ancillaries
      passengers - the passengers
      Returns:
      the list
    • createOfferRequestData

      protected OfferRequestData createOfferRequestData(NDCOfferItemBundleData ndcOfferItemBundleData, int originDestinationRefNum, List<NDCPassengerData> passengers, String routeCode)
      Creates an offer request data from a bundle data. In the offerRequestData we will have only one itinerary at time, since the offeritem corresponds either to an outbound or an inbound, not together.
      Parameters:
      ndcOfferItemBundleData - the ndc offer item bundle data
      originDestinationRefNum - the origin destination ref num
      passengers - the passengers
      routeCode - the route code
      Returns:
      the offer request data
    • getProductCatalogIdFromBaseSite

      protected String getProductCatalogIdFromBaseSite() throws NDCException
      Gets product catalog id from baseSiteService.
      Returns:
      the product catalog
      Throws:
      NDCException
    • getTransportOfferingFacade

      protected TransportOfferingFacade getTransportOfferingFacade()
      Gets transport offering facade.
      Returns:
      the transport offering facade
    • setTransportOfferingFacade

      public void setTransportOfferingFacade(TransportOfferingFacade transportOfferingFacade)
      Sets transport offering facade.
      Parameters:
      transportOfferingFacade - the transport offering facade
    • getTravelRouteFacade

      protected TravelRouteFacade getTravelRouteFacade()
      Gets travel route facade.
      Returns:
      the travel route facade
    • setTravelRouteFacade

      public void setTravelRouteFacade(TravelRouteFacade travelRouteFacade)
      Sets travel route facade.
      Parameters:
      travelRouteFacade - the travel route facade
    • getConfigurationService

      protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()
      Gets configuration service.
      Returns:
      the configuration service
    • setConfigurationService

      public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
      Sets configuration service.
      Parameters:
      configurationService - the configuration service
    • getAncillarySearchPipelineManager

      protected AncillarySearchPipelineManager getAncillarySearchPipelineManager()
      Gets ancillary search pipeline managers.
      Returns:
      the ancillary search pipeline managers
    • setAncillarySearchPipelineManager

      public void setAncillarySearchPipelineManager(AncillarySearchPipelineManager ancillarySearchPipelineManager)
      Sets ancillary search pipeline managers.
      Parameters:
      ancillarySearchPipelineManager - the ancillary search pipeline managers
    • getTravelBundleTemplateService

      protected TravelBundleTemplateService getTravelBundleTemplateService()
      Gets travel bundle template service.
      Returns:
      the travel bundle template service
    • setTravelBundleTemplateService

      public void setTravelBundleTemplateService(TravelBundleTemplateService travelBundleTemplateService)
      Sets travel bundle template service.
      Parameters:
      travelBundleTemplateService - the travel bundle template service
    • getBaseSiteService

      protected de.hybris.platform.site.BaseSiteService getBaseSiteService()
      Gets base site service.
      Returns:
      the base site service
    • setBaseSiteService

      public void setBaseSiteService(de.hybris.platform.site.BaseSiteService baseSiteService)
      Sets base site service.
      Parameters:
      baseSiteService - the base site service
    • getKeyGenerator

      protected de.hybris.platform.servicelayer.keygenerator.KeyGenerator getKeyGenerator()
      Gets key generator.
      Returns:
      the key generator
    • setKeyGenerator

      public void setKeyGenerator(de.hybris.platform.servicelayer.keygenerator.KeyGenerator keyGenerator)
      Sets key generator.
      Parameters:
      keyGenerator - the key generator