Class DefaultTravelCommercePriceFacade

java.lang.Object
de.hybris.platform.travelfacades.facades.impl.DefaultTravelCommercePriceFacade
All Implemented Interfaces:
TravelCommercePriceFacade
Direct Known Subclasses:
DefaultNDCTravelCommercePriceFacade

public class DefaultTravelCommercePriceFacade extends Object implements TravelCommercePriceFacade
Implementation class for TravelCommercePriceFacade
  • Constructor Details

    • DefaultTravelCommercePriceFacade

      public DefaultTravelCommercePriceFacade()
  • Method Details

    • getPriceInformation

      public de.hybris.platform.jalo.order.price.PriceInformation getPriceInformation(String productCode)
      Description copied from interface: TravelCommercePriceFacade
      This method gets the price for a product.
      Specified by:
      getPriceInformation in interface TravelCommercePriceFacade
      Parameters:
      productCode - the product code
      Returns:
      PriceInformation price information
    • getPriceInformation

      public de.hybris.platform.jalo.order.price.PriceInformation getPriceInformation(String productCode, String searchKey, String searchValue)
      Description copied from interface: TravelCommercePriceFacade
      This method gets the price information for the given product code, search key and search value.
      Specified by:
      getPriceInformation in interface TravelCommercePriceFacade
      Parameters:
      productCode - the product code
      searchKey - the search key
      searchValue - the search value
      Returns:
      PriceInformation price information
    • getPriceInformationByHierarchy

      public de.hybris.platform.jalo.order.price.PriceInformation getPriceInformationByHierarchy(String productCode, String transportOfferingCode, String sectorCode, String routeCode)
      Description copied from interface: TravelCommercePriceFacade
      Method to get the price information for product code, search key and search value. The prices are searched in the order of transportoffering, sector, route and default price. The first available price will be returned.
      Specified by:
      getPriceInformationByHierarchy in interface TravelCommercePriceFacade
      Parameters:
      productCode - the product code
      transportOfferingCode - the transport offering code
      sectorCode - the sector code
      routeCode - the route code
      Returns:
      PriceInformation price information by hierarchy
    • getPriceLookupAttributes

      protected String[] getPriceLookupAttributes()
      This method returns an array of the attributes used for the pricing lookup. The array of the attributes used is taken from the property pricing.lookup.attributes
      Returns:
      the String array
    • getPriceLevelInfo

      public PriceLevel getPriceLevelInfo(String productCode, List<String> transportOfferings, String routeCode)
      Description copied from interface: TravelCommercePriceFacade
      Method to find the price level info. The first available price information is used to build the map.
      Specified by:
      getPriceLevelInfo in interface TravelCommercePriceFacade
      Parameters:
      productCode - the product code
      transportOfferings - the transport offerings
      routeCode - the route code
      Returns:
      the price level info
    • getPriceLevelInfoByHierarchy

      public PriceLevel getPriceLevelInfoByHierarchy(ProductModel product, String transportOfferingCode, String routeCode)
      Description copied from interface: TravelCommercePriceFacade
      Method to get the price level and value for product code, search key and search value. The price level is searched in the order of transportoffering, sector, route and default price. The first available price level will be returned.
      Specified by:
      getPriceLevelInfoByHierarchy in interface TravelCommercePriceFacade
      Parameters:
      product - the product
      transportOfferingCode - the transport offering code
      routeCode - the route code
      Returns:
      price level
    • getPriceInformationByProductPriceBundleRule

      public de.hybris.platform.jalo.order.price.PriceInformation getPriceInformationByProductPriceBundleRule(BundleTemplateModel bundleTemplate, String productCode)
      Description copied from interface: TravelCommercePriceFacade
      This method checks if any ChangeProductPriceBundleRule exist for the product, if found then it created PriceInformation based on the price set within the rule
      Specified by:
      getPriceInformationByProductPriceBundleRule in interface TravelCommercePriceFacade
      Parameters:
      bundleTemplate - the bundle template
      productCode - the product code
      Returns:
      PriceInformation price information by product price bundle rule
    • setPriceAndTaxSearchCriteriaInContext

      public void setPriceAndTaxSearchCriteriaInContext(PriceLevel priceLevel, List<String> transportOfferingCodes, TravellerData travellerData)
      Description copied from interface: TravelCommercePriceFacade
      Method to set price and tax search criteria in session context These values will be used to retrieve prices during cart calculation when the product is added to cart.
      Specified by:
      setPriceAndTaxSearchCriteriaInContext in interface TravelCommercePriceFacade
      Parameters:
      priceLevel - the price level
      transportOfferingCodes - the transport offering codes
      travellerData - the traveller data
    • setPriceAndTaxSearchCriteriaInContext

      public void setPriceAndTaxSearchCriteriaInContext(PriceLevel priceLevel, List<String> transportOfferingCodes)
      Description copied from interface: TravelCommercePriceFacade
      Method to set price and tax search criteria in session context These values will be used to retrieve prices during cart calculation when the product is added to cart.
      Specified by:
      setPriceAndTaxSearchCriteriaInContext in interface TravelCommercePriceFacade
      Parameters:
      priceLevel - the price level
      transportOfferingCodes - the transport offering codes
    • setPriceSearchCriteriaInContext

      public void setPriceSearchCriteriaInContext(PriceLevel priceLevel)
      Description copied from interface: TravelCommercePriceFacade
      Method to set price search criteria in session context These values will be used to retrieve prices during cart calculation when the product is added to cart.
      Specified by:
      setPriceSearchCriteriaInContext in interface TravelCommercePriceFacade
      Parameters:
      priceLevel - the price level
    • setTaxSearchCriteriaInContext

      public void setTaxSearchCriteriaInContext(List<String> transportOfferingCodes, TravellerData travellerData)
      Description copied from interface: TravelCommercePriceFacade
      Method to set values in Session Context. These values will be used to retrieve taxes during cart calculation when the product is added to cart.
      Specified by:
      setTaxSearchCriteriaInContext in interface TravelCommercePriceFacade
      Parameters:
      transportOfferingCodes - the transport offering codes
      travellerData - the traveller data
    • isPriceInformationAvailable

      public boolean isPriceInformationAvailable(ProductModel product, String searchKey, String searchValue)
      Description copied from interface: TravelCommercePriceFacade
      Method to check if the price information is available for the given search criteria
      Specified by:
      isPriceInformationAvailable in interface TravelCommercePriceFacade
      Parameters:
      product - the product
      searchKey - the search key
      searchValue - the search value
      Returns:
      boolean boolean
    • addPropertyPriceLevelToCartEntry

      public void addPropertyPriceLevelToCartEntry(PriceLevel priceLevel, String productCode, int entryNo)
      Description copied from interface: TravelCommercePriceFacade
      Method to add price level property to cart entry
      Specified by:
      addPropertyPriceLevelToCartEntry in interface TravelCommercePriceFacade
      Parameters:
      priceLevel - the price level
      productCode - the product code
      entryNo - the entry no
    • getBookingFeesAndTaxes

      public BigDecimal getBookingFeesAndTaxes()
      Description copied from interface: TravelCommercePriceFacade
      Method to get booking level fees and taxes
      Specified by:
      getBookingFeesAndTaxes in interface TravelCommercePriceFacade
      Returns:
      booking fees and taxes
    • getPaidAmount

      public PriceData getPaidAmount(AccommodationReservationData reservationData)
      Specified by:
      getPaidAmount in interface TravelCommercePriceFacade
      Returns:
    • getDueAmount

      public PriceData getDueAmount(AccommodationReservationData reservationData, PriceData amountPaid)
      Specified by:
      getDueAmount in interface TravelCommercePriceFacade
      Returns:
    • isNetPriceProduct

      public Boolean isNetPriceProduct(ProductModel product)
      Description copied from interface: TravelCommercePriceFacade
      Return true if the product is net priced, false otherwise
      Specified by:
      isNetPriceProduct in interface TravelCommercePriceFacade
      Returns:
    • createPriceData

      public PriceData createPriceData(double price)
      Description copied from interface: TravelCommercePriceFacade
      Method to create a price data for given price value
      Specified by:
      createPriceData in interface TravelCommercePriceFacade
      Parameters:
      price - the price
      Returns:
      price data
    • createPriceData

      public PriceData createPriceData(double price, String currencyIsoCode)
      Description copied from interface: TravelCommercePriceFacade
      Method to create a price data for given price value along with the scale
      Specified by:
      createPriceData in interface TravelCommercePriceFacade
      Parameters:
      price - the price
      currencyIsoCode - the currencyIsoCode
      Returns:
      price data
    • createPriceData

      public PriceData createPriceData(PriceDataType priceType, BigDecimal value, String currencyIso)
      Description copied from interface: TravelCommercePriceFacade
      Creates a PriceData object with a formatted currency string based on the price type and currency ISO code.
      Specified by:
      createPriceData in interface TravelCommercePriceFacade
      Parameters:
      priceType - The price type
      value - The price amount
      currencyIso - The currency ISO code
      Returns:
      the price data
    • createPriceData

      public PriceData createPriceData(double price, int scale)
      Description copied from interface: TravelCommercePriceFacade
      Method to create a price data for given price value along with the scale
      Specified by:
      createPriceData in interface TravelCommercePriceFacade
      Parameters:
      price - the price
      Returns:
      price data
    • createPriceData

      public PriceData createPriceData(double price, int scale, String currencyIso)
      Description copied from interface: TravelCommercePriceFacade
      Method to create a price data for given price value along with the scale
      Specified by:
      createPriceData in interface TravelCommercePriceFacade
      Parameters:
      price - the price
      Returns:
      price data
    • createPriceData

      public PriceData createPriceData(PriceDataType priceType, BigDecimal value, CurrencyModel currency)
      Description copied from interface: TravelCommercePriceFacade
      Creates a PriceData object with a formatted currency string based on the price type and currency.
      Specified by:
      createPriceData in interface TravelCommercePriceFacade
      Parameters:
      priceType - The price type
      value - The price amount
      currency - The currency
      Returns:
      the price data
    • createPriceData

      public PriceData createPriceData(BigDecimal price)
      Description copied from interface: TravelCommercePriceFacade
      Method to create a price data for given price value
      Specified by:
      createPriceData in interface TravelCommercePriceFacade
      Parameters:
      price - the price
      Returns:
      price data
    • getProductService

      protected de.hybris.platform.product.ProductService getProductService()
      Returns:
      instance of productService
    • setProductService

      public void setProductService(de.hybris.platform.product.ProductService productService)
      Parameters:
      productService -
    • getTravelCommercePriceService

      protected TravelCommercePriceService getTravelCommercePriceService()
      Returns:
      instance of travelCommercePriceService
    • setTravelCommercePriceService

      public void setTravelCommercePriceService(TravelCommercePriceService travelCommercePriceService)
      Parameters:
      travelCommercePriceService -
    • getTransportOfferingFacade

      protected TransportOfferingFacade getTransportOfferingFacade()
      Returns:
      the transportOfferingFacade
    • setTransportOfferingFacade

      public void setTransportOfferingFacade(TransportOfferingFacade transportOfferingFacade)
      Parameters:
      transportOfferingFacade - the transportOfferingFacade to set
    • getBundleRuleService

      protected de.hybris.platform.configurablebundleservices.bundle.BundleRuleService getBundleRuleService()
      Returns:
      the bundleRuleService
    • setBundleRuleService

      public void setBundleRuleService(de.hybris.platform.configurablebundleservices.bundle.BundleRuleService bundleRuleService)
      Parameters:
      bundleRuleService - the bundleRuleService to set
    • getCommonI18NService

      protected de.hybris.platform.servicelayer.i18n.CommonI18NService getCommonI18NService()
      Returns:
      the commonI18NService
    • setCommonI18NService

      public void setCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService)
      Parameters:
      commonI18NService - the commonI18NService to set
    • getTransportOfferingService

      protected TransportOfferingService getTransportOfferingService()
      Returns:
      the transportOfferingService
    • setTransportOfferingService

      public void setTransportOfferingService(TransportOfferingService transportOfferingService)
      Parameters:
      transportOfferingService - the transportOfferingService to set
    • getConfigurationService

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

      public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
      Parameters:
      configurationService - the configurationService to set
    • getTravelRulesService

      protected TravelRulesService getTravelRulesService()
      Returns:
      the travelRulesService
    • setTravelRulesService

      public void setTravelRulesService(TravelRulesService travelRulesService)
      Parameters:
      travelRulesService - the travelRulesService to set
    • getPriceDataFactory

      protected de.hybris.platform.commercefacades.product.PriceDataFactory getPriceDataFactory()
      Returns:
      the priceDataFactory
    • setPriceDataFactory

      public void setPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory)
      Parameters:
      priceDataFactory - the priceDataFactory to set