Class PROSCarrierOfferPriceHandler

java.lang.Object
de.hybris.platform.ndc182shoppingfacades.facades.offerprice.handlers.impl.CarrierOfferPriceHandler
de.hybris.platform.ndc182prosfacades.facades.offerprice.handlers.impl.PROSCarrierOfferPriceHandler
All Implemented Interfaces:
OfferPriceHandler

public class PROSCarrierOfferPriceHandler extends CarrierOfferPriceHandler
Populates offer price response from IntelliPricerResponse.
  • Constructor Details

    • PROSCarrierOfferPriceHandler

      public PROSCarrierOfferPriceHandler()
  • Method Details

    • handle

      public void handle(NDCCarrierOfferData ndcOfferData, IATAOfferPriceRS offerPriceRS) throws NDCException
      Description copied from interface: OfferPriceHandler
      Handles data from ndcOfferData to offerPriceRS.
      Specified by:
      handle in interface OfferPriceHandler
      Specified by:
      handle in class CarrierOfferPriceHandler
      Parameters:
      ndcOfferData - the ndcOffersData
      offerPriceRS - the offerPriceRS
      Throws:
      NDCException
    • getOfferItemSegmentMapping

      protected Map<NDCCarrierOfferItemData,FlightGroup> getOfferItemSegmentMapping(NDCCarrierOfferData ndcOfferData, PROSSearchResponse prosSearchResponse)
      Creates the mapping between NDC offer item and segment price from PROS.
      Parameters:
      ndcOfferData - the NDC offer
      prosSearchResponse - the pros response
      Returns:
      the mapping between NDC offer item and segment price from PROS
    • getRouteBundleMapping

      protected Map<String,BundleTemplateModel> getRouteBundleMapping(Map<NDCCarrierOfferItemData,FlightGroup> offerItemSegment, PROSSearchResponse prosSearchResponse) throws NDCException
      Creates the mapping between route and bundle template for this route.
      Parameters:
      offerItemSegment - the mapping between NDC offer item and segment price from PROS
      prosSearchResponse - the pros response
      Returns:
      the mapping between route and bundle template for this route
      Throws:
      NDCException
    • getOfferItemSegmentPriceMapping

      protected Map<NDCCarrierOfferItemData,SegmentPrice> getOfferItemSegmentPriceMapping(Map<NDCCarrierOfferItemData,FlightGroup> offerItemSegment, PROSSearchResponse prosSearchResponse)
      Creates the mapping between NDC offer item and segment price from PROS.
      Parameters:
      offerItemSegment - the mapping between NDC offer item and segment price from PROS
      prosSearchResponse - the pros response
      Returns:
      the mapping between NDC offer item and segment price from PROS
    • populateBaggageAllowances

      protected void populateBaggageAllowances(PROSSearchResponse prosSearchResponse, ResponseType responseType)
      Populates baggage allowances from PROS response.
      Parameters:
      prosSearchResponse - the pros response
      responseType - the response type
    • populatePriceClass

      protected void populatePriceClass(Map<String,BundleTemplateModel> routeBundle, ResponseType responseType)
      Populates price class from NDC offer.
      Parameters:
      routeBundle - the mapping between route and bundle template for this route
      responseType - the response type
    • populatePricedOffer

      protected void populatePricedOffer(NDCCarrierOfferData ndcOfferData, Map<String,BundleTemplateModel> routeBundle, Map<NDCCarrierOfferItemData,SegmentPrice> offerItemSegmentPrice, ResponseType responseType) throws NDCException
      Populates priced offer from NDC offer.
      Parameters:
      ndcOfferData - the NDC offer
      routeBundle - the mapping between route and bundle template for this route
      offerItemSegmentPrice - the mapping between NDC offer item and segment price from PROS
      responseType - the response type
      Throws:
      NDCException
    • getAncillaryBundleMapping

      protected Map<String,BundleTemplateModel> getAncillaryBundleMapping(Set<String> fareProductCodes) throws NDCException
      Get ancillary bundle for for fare code mapping
      Parameters:
      fareProductCodes - fare product codes
      Returns:
      ancillary bundle for for fare code mapping
      Throws:
      NDCException
    • getBundleProductPriceData

      protected Map<String,List<BundleProductPriceData>> getBundleProductPriceData(Map<String,BundleTemplateModel> ancillaryBundleMapping)
      Get product price based on the change product price bundle rules
      Parameters:
      ancillaryBundleMapping - the ancillary bundle mapping
      Returns:
      bundle product price data list
    • getBundleProductPriceForOfferItem

      protected BigDecimal getBundleProductPriceForOfferItem(NDCCarrierOfferItemData ndcOfferItemData, List<BundleProductPriceData> products)
      Calculates bundle product price for NDC offer item
      Parameters:
      ndcOfferItemData - the ndc offer item
      products - the list of bundle products
      Returns:
      bundle product price for NDC offer item
    • createServices

      protected List<Service1Type> createServices(NDCCarrierOfferItemData ndcOfferItemData, Map<String,BundleTemplateModel> routeBundle, Map<String,ProductModel> servicesMapping)
      Creates services.
      Parameters:
      ndcOfferItemData - the ndc offer item data
      routeBundle - the mapping between route and bundle template for this route
      Returns:
      the list of services
    • createServicesFromProducts

      protected List<Service1Type> createServicesFromProducts(List<ProductModel> products, List<NDCPassengerData> ndcPassengers, List<String> transportOfferingCodes)
      Creates services from the products.
      Parameters:
      products - the products
      ndcPassengers - the ndc passengers
      transportOfferingCodes - the transport offering codes
      Returns:
      the list
    • calculatePriceForOfferItem

      protected PriceType calculatePriceForOfferItem(NDCCarrierOfferItemData ndcOfferItemData, Map<NDCCarrierOfferItemData,SegmentPrice> offerItemSegmentPrice, BigDecimal bundleProductPrice)
      Calculates the price for specific NDC offer item.
      Parameters:
      ndcOfferItemData - the NDC offer item
      offerItemSegmentPrice - the mapping between NDC offer item and segment price from PROS
      Returns:
      the price for NDC offer item
    • createJourneyOverview

      protected JourneyOverviewType createJourneyOverview(DataListsType dataLists, Map<String,BundleTemplateModel> routeBundle)
      Creates the journey overview.
      Parameters:
      dataLists - the ndc data lists
      routeBundle - the mapping between route and bundle template for this route
      Returns:
      the journey overview type
    • createServiceDefinitions

      protected ServiceDefinitionListType createServiceDefinitions(Collection<ProductModel> products)
      Creates the service definitions.
      Parameters:
      products - the products
      Returns:
      the service definitions
    • createFareDetail

      protected FareDetailType createFareDetail(NDCCarrierOfferItemData ndcOfferItemData, Map<String,BundleTemplateModel> routeBundle, PriceType priceType)
      Creates the fare detail type.
      Parameters:
      ndcOfferItemData - the NDC offer item
      routeBundle - the mapping between route and bundle template for this route
      Returns:
      the the fare detail type
    • getTravelBundleTemplateService

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

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

      protected TravelRestrictionFacade getTravelRestrictionFacade()
      Get travel restriction facade
      Returns:
      the travel restriction facade
    • setTravelRestrictionFacade

      public void setTravelRestrictionFacade(TravelRestrictionFacade travelRestrictionFacade)
      Set the travel restriction facade
      Parameters:
      travelRestrictionFacade - the travel restriction facade
    • getTravelCommercePriceFacade

      protected TravelCommercePriceFacade getTravelCommercePriceFacade()
      Gets travel commerce price facade.
      Returns:
      the travelCommercePriceFacade
    • setTravelCommercePriceFacade

      public void setTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade)
      Sets travel commerce price facade.
      Parameters:
      travelCommercePriceFacade - the travelCommercePriceFacade to set
    • getProductService

      protected de.hybris.platform.product.ProductService getProductService()
      Gets product service.
      Returns:
      the productService
    • setProductService

      public void setProductService(de.hybris.platform.product.ProductService productService)
      Sets product service.
      Parameters:
      productService - the productService to set
    • 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
    • getFarePriceFacade

      protected FarePriceFacade getFarePriceFacade()
      Gets fare price service.
      Returns:
      the fare price service
    • setFarePriceFacade

      public void setFarePriceFacade(FarePriceFacade farePriceFacade)
      Sets fare price service.
      Parameters:
      farePriceFacade - the fare price service
    • getTransportFacilityFacade

      protected TransportFacilityFacade getTransportFacilityFacade()
      Gets transport facility facade.
      Returns:
      the transport facility facade
    • setTransportFacilityFacade

      public void setTransportFacilityFacade(TransportFacilityFacade transportFacilityFacade)
      Sets transport facility facade.
      Parameters:
      transportFacilityFacade - the transport facility facade
    • getStoreSessionFacade

      protected de.hybris.platform.commercefacades.storesession.StoreSessionFacade getStoreSessionFacade()
      Gets store session facade.
      Returns:
      the store session facade
    • setStoreSessionFacade

      public void setStoreSessionFacade(de.hybris.platform.commercefacades.storesession.StoreSessionFacade storeSessionFacade)
      Sets store session facade.
      Parameters:
      storeSessionFacade - the store session 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
    • getSolutionRequestConverter

      protected de.hybris.platform.servicelayer.dto.converter.Converter<NDCCarrierOfferData,AddSolutionRequestData> getSolutionRequestConverter()
      Gets solution request converter.
      Returns:
      the solution request converter
    • setSolutionRequestConverter

      public void setSolutionRequestConverter(de.hybris.platform.servicelayer.dto.converter.Converter<NDCCarrierOfferData,AddSolutionRequestData> solutionRequestConverter)
      Sets solution request converter.
      Parameters:
      solutionRequestConverter - the solution request converter
    • getOfferGroupToOriginDestinationMapping

      protected Map<String,String> getOfferGroupToOriginDestinationMapping()
      Get offer group to origin destination mapping
      Returns:
    • setOfferGroupToOriginDestinationMapping

      public void setOfferGroupToOriginDestinationMapping(Map<String,String> offerGroupToOriginDestinationMapping)
      Set offer group to origin destination mapping
      Parameters:
      offerGroupToOriginDestinationMapping -