Class DefaultOfferPriceAlaCarteOffersHandler

java.lang.Object
de.hybris.platform.ndc182facades.facades.offerprice.handlers.impl.DefaultOfferPriceAlaCarteOffersHandler
All Implemented Interfaces:
OfferPriceHandler

public class DefaultOfferPriceAlaCarteOffersHandler extends Object implements OfferPriceHandler
The ndc implementation of OfferPriceHandler interface.
  • Constructor Details

    • DefaultOfferPriceAlaCarteOffersHandler

      public DefaultOfferPriceAlaCarteOffersHandler()
  • Method Details

    • handle

      public void handle(NDCCarrierOfferData ndcOfferData, IATAOfferPriceRS offerPriceRS) throws NDCException
      This handler populates the list of alaCarteOffer for each ndcOfferData. An alaCarteOffer contains the list of available ancillaries for each offer listed in the offerPriceRQ.
      Specified by:
      handle in interface OfferPriceHandler
      Parameters:
      ndcOfferData - the ndcOffersData
      offerPriceRS - the offerPriceRS
      Throws:
      NDCException
    • createAlaCarteOfferItems

      protected List<ALaCarteOfferItemType> createAlaCarteOfferItems(List<NDCCarrierOfferItemData> offerItemIds, String offerID) 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
      offerID - the offerID
      Returns:
      the list
      Throws:
      NDCException
    • createAlaCarteOfferItemsFromOriginDestinationOfferInfoData

      protected List<ALaCarteOfferItemType> createAlaCarteOfferItemsFromOriginDestinationOfferInfoData(List<OriginDestinationOfferInfoData> originDestinationInfoDataList, Map<String,Integer> includedAncillaries, String offerItemID, List<NDCPassengerData> passengers, String offerID, String routeCode)
      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
      offerItemID - the offer item id
      passengers - the passengers
      offerID - the offerID
      routeCode - the routeCode
      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
    • storeAlaCarteCacheData

      protected void storeAlaCarteCacheData(OfferType alaCarteOffer, NDCCarrierOfferData ndcOfferData) throws NDCException
      Stores ala carte offer data into the cache.
      Parameters:
      alaCarteOffer - the ala carte offer
      ndcOfferData - the ndc offer data
      Throws:
      NDCException - the ndc exception
    • createNdcPassengerListFromNdcOfferData

      protected List<NDCPassengerData> createNdcPassengerListFromNdcOfferData(List<NDCPassengerData> passengers, List<String> paxRefIDs) throws NDCException
      Creates ndc passenger list from ndc offer data list.
      Parameters:
      passengers - the passengers
      paxRefIDs - the pax ref i ds
      Returns:
      the list
      Throws:
      NDCException
    • getProductCatalogIdFromBaseSiteService

      protected String getProductCatalogIdFromBaseSiteService() 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
    • getNdcOfferFacade

      protected NDCOfferFacade getNdcOfferFacade()
      Gets ndc offer facade.
      Returns:
      the ndc offer facade
    • setNdcOfferFacade

      public void setNdcOfferFacade(NDCOfferFacade ndcOfferFacade)
      Sets ndc offer facade.
      Parameters:
      ndcOfferFacade - the ndc offer facade