Class DefaultTravelCommercePriceFacade
java.lang.Object
de.hybris.platform.travelfacades.facades.impl.DefaultTravelCommercePriceFacade
- All Implemented Interfaces:
TravelCommercePriceFacade
- Direct Known Subclasses:
DefaultNDCTravelCommercePriceFacade
Implementation class for
TravelCommercePriceFacade-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyPriceLevelToCartEntry(PriceLevel priceLevel, String productCode, int entryNo) Method to add price level property to cart entrycreatePriceData(double price) Method to create a price data for given price valuecreatePriceData(double price, int scale) Method to create a price data for given price value along with the scalecreatePriceData(double price, int scale, String currencyIso) Method to create a price data for given price value along with the scalecreatePriceData(double price, String currencyIsoCode) Method to create a price data for given price value along with the scalecreatePriceData(PriceDataType priceType, BigDecimal value, CurrencyModel currency) Creates a PriceData object with a formatted currency string based on the price type and currency.createPriceData(PriceDataType priceType, BigDecimal value, String currencyIso) Creates a PriceData object with a formatted currency string based on the price type and currency ISO code.createPriceData(BigDecimal price) Method to create a price data for given price valueMethod to get booking level fees and taxesprotected de.hybris.platform.configurablebundleservices.bundle.BundleRuleServiceprotected de.hybris.platform.servicelayer.i18n.CommonI18NServiceprotected de.hybris.platform.servicelayer.config.ConfigurationServicegetDueAmount(AccommodationReservationData reservationData, PriceData amountPaid) getPaidAmount(AccommodationReservationData reservationData) protected de.hybris.platform.commercefacades.product.PriceDataFactoryde.hybris.platform.jalo.order.price.PriceInformationgetPriceInformation(String productCode) This method gets the price for a product.de.hybris.platform.jalo.order.price.PriceInformationgetPriceInformation(String productCode, String searchKey, String searchValue) This method gets the price information for the given product code, search key and search value.de.hybris.platform.jalo.order.price.PriceInformationgetPriceInformationByHierarchy(String productCode, String transportOfferingCode, String sectorCode, String routeCode) Method to get the price information for product code, search key and search value.de.hybris.platform.jalo.order.price.PriceInformationgetPriceInformationByProductPriceBundleRule(BundleTemplateModel bundleTemplate, String productCode) This method checks if any ChangeProductPriceBundleRule exist for the product, if found then it created PriceInformation based on the price set within the rulegetPriceLevelInfo(String productCode, List<String> transportOfferings, String routeCode) Method to find the price level info.getPriceLevelInfoByHierarchy(ProductModel product, String transportOfferingCode, String routeCode) Method to get the price level and value for product code, search key and search value.protected String[]This method returns an array of the attributes used for the pricing lookup.protected de.hybris.platform.product.ProductServiceprotected TransportOfferingFacadeprotected TransportOfferingServiceprotected TravelCommercePriceServiceprotected TravelRulesServiceisNetPriceProduct(ProductModel product) Return true if the product is net priced, false otherwisebooleanisPriceInformationAvailable(ProductModel product, String searchKey, String searchValue) Method to check if the price information is available for the given search criteriavoidsetBundleRuleService(de.hybris.platform.configurablebundleservices.bundle.BundleRuleService bundleRuleService) voidsetCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetPriceAndTaxSearchCriteriaInContext(PriceLevel priceLevel, List<String> transportOfferingCodes) 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.voidsetPriceAndTaxSearchCriteriaInContext(PriceLevel priceLevel, List<String> transportOfferingCodes, TravellerData travellerData) 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.voidsetPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory) voidsetPriceSearchCriteriaInContext(PriceLevel priceLevel) 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.voidsetProductService(de.hybris.platform.product.ProductService productService) voidsetTaxSearchCriteriaInContext(List<String> transportOfferingCodes, TravellerData travellerData) Method to set values in Session Context.voidsetTransportOfferingFacade(TransportOfferingFacade transportOfferingFacade) voidsetTransportOfferingService(TransportOfferingService transportOfferingService) voidsetTravelCommercePriceService(TravelCommercePriceService travelCommercePriceService) voidsetTravelRulesService(TravelRulesService travelRulesService)
-
Constructor Details
-
DefaultTravelCommercePriceFacade
public DefaultTravelCommercePriceFacade()
-
-
Method Details
-
getPriceInformation
Description copied from interface:TravelCommercePriceFacadeThis method gets the price for a product.- Specified by:
getPriceInformationin interfaceTravelCommercePriceFacade- 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:TravelCommercePriceFacadeThis method gets the price information for the given product code, search key and search value.- Specified by:
getPriceInformationin interfaceTravelCommercePriceFacade- Parameters:
productCode- the product codesearchKey- the search keysearchValue- 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:TravelCommercePriceFacadeMethod 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:
getPriceInformationByHierarchyin interfaceTravelCommercePriceFacade- Parameters:
productCode- the product codetransportOfferingCode- the transport offering codesectorCode- the sector coderouteCode- the route code- Returns:
- PriceInformation price information by hierarchy
-
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:TravelCommercePriceFacadeMethod to find the price level info. The first available price information is used to build the map.- Specified by:
getPriceLevelInfoin interfaceTravelCommercePriceFacade- Parameters:
productCode- the product codetransportOfferings- the transport offeringsrouteCode- the route code- Returns:
- the price level info
-
getPriceLevelInfoByHierarchy
public PriceLevel getPriceLevelInfoByHierarchy(ProductModel product, String transportOfferingCode, String routeCode) Description copied from interface:TravelCommercePriceFacadeMethod 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:
getPriceLevelInfoByHierarchyin interfaceTravelCommercePriceFacade- Parameters:
product- the producttransportOfferingCode- the transport offering coderouteCode- the route code- Returns:
- price level
-
getPriceInformationByProductPriceBundleRule
public de.hybris.platform.jalo.order.price.PriceInformation getPriceInformationByProductPriceBundleRule(BundleTemplateModel bundleTemplate, String productCode) Description copied from interface:TravelCommercePriceFacadeThis 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:
getPriceInformationByProductPriceBundleRulein interfaceTravelCommercePriceFacade- Parameters:
bundleTemplate- the bundle templateproductCode- 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:TravelCommercePriceFacadeMethod 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:
setPriceAndTaxSearchCriteriaInContextin interfaceTravelCommercePriceFacade- Parameters:
priceLevel- the price leveltransportOfferingCodes- the transport offering codestravellerData- the traveller data
-
setPriceAndTaxSearchCriteriaInContext
public void setPriceAndTaxSearchCriteriaInContext(PriceLevel priceLevel, List<String> transportOfferingCodes) Description copied from interface:TravelCommercePriceFacadeMethod 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:
setPriceAndTaxSearchCriteriaInContextin interfaceTravelCommercePriceFacade- Parameters:
priceLevel- the price leveltransportOfferingCodes- the transport offering codes
-
setPriceSearchCriteriaInContext
Description copied from interface:TravelCommercePriceFacadeMethod 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:
setPriceSearchCriteriaInContextin interfaceTravelCommercePriceFacade- Parameters:
priceLevel- the price level
-
setTaxSearchCriteriaInContext
public void setTaxSearchCriteriaInContext(List<String> transportOfferingCodes, TravellerData travellerData) Description copied from interface:TravelCommercePriceFacadeMethod 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:
setTaxSearchCriteriaInContextin interfaceTravelCommercePriceFacade- Parameters:
transportOfferingCodes- the transport offering codestravellerData- the traveller data
-
isPriceInformationAvailable
public boolean isPriceInformationAvailable(ProductModel product, String searchKey, String searchValue) Description copied from interface:TravelCommercePriceFacadeMethod to check if the price information is available for the given search criteria- Specified by:
isPriceInformationAvailablein interfaceTravelCommercePriceFacade- Parameters:
product- the productsearchKey- the search keysearchValue- the search value- Returns:
- boolean boolean
-
addPropertyPriceLevelToCartEntry
public void addPropertyPriceLevelToCartEntry(PriceLevel priceLevel, String productCode, int entryNo) Description copied from interface:TravelCommercePriceFacadeMethod to add price level property to cart entry- Specified by:
addPropertyPriceLevelToCartEntryin interfaceTravelCommercePriceFacade- Parameters:
priceLevel- the price levelproductCode- the product codeentryNo- the entry no
-
getBookingFeesAndTaxes
Description copied from interface:TravelCommercePriceFacadeMethod to get booking level fees and taxes- Specified by:
getBookingFeesAndTaxesin interfaceTravelCommercePriceFacade- Returns:
- booking fees and taxes
-
getPaidAmount
- Specified by:
getPaidAmountin interfaceTravelCommercePriceFacade- Returns:
-
getDueAmount
- Specified by:
getDueAmountin interfaceTravelCommercePriceFacade- Returns:
-
isNetPriceProduct
Description copied from interface:TravelCommercePriceFacadeReturn true if the product is net priced, false otherwise- Specified by:
isNetPriceProductin interfaceTravelCommercePriceFacade- Returns:
-
createPriceData
Description copied from interface:TravelCommercePriceFacadeMethod to create a price data for given price value- Specified by:
createPriceDatain interfaceTravelCommercePriceFacade- Parameters:
price- the price- Returns:
- price data
-
createPriceData
Description copied from interface:TravelCommercePriceFacadeMethod to create a price data for given price value along with the scale- Specified by:
createPriceDatain interfaceTravelCommercePriceFacade- Parameters:
price- the pricecurrencyIsoCode- the currencyIsoCode- Returns:
- price data
-
createPriceData
Description copied from interface:TravelCommercePriceFacadeCreates a PriceData object with a formatted currency string based on the price type and currency ISO code.- Specified by:
createPriceDatain interfaceTravelCommercePriceFacade- Parameters:
priceType- The price typevalue- The price amountcurrencyIso- The currency ISO code- Returns:
- the price data
-
createPriceData
Description copied from interface:TravelCommercePriceFacadeMethod to create a price data for given price value along with the scale- Specified by:
createPriceDatain interfaceTravelCommercePriceFacade- Parameters:
price- the price- Returns:
- price data
-
createPriceData
Description copied from interface:TravelCommercePriceFacadeMethod to create a price data for given price value along with the scale- Specified by:
createPriceDatain interfaceTravelCommercePriceFacade- Parameters:
price- the price- Returns:
- price data
-
createPriceData
Description copied from interface:TravelCommercePriceFacadeCreates a PriceData object with a formatted currency string based on the price type and currency.- Specified by:
createPriceDatain interfaceTravelCommercePriceFacade- Parameters:
priceType- The price typevalue- The price amountcurrency- The currency- Returns:
- the price data
-
createPriceData
Description copied from interface:TravelCommercePriceFacadeMethod to create a price data for given price value- Specified by:
createPriceDatain interfaceTravelCommercePriceFacade- 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
- Returns:
- instance of travelCommercePriceService
-
setTravelCommercePriceService
- Parameters:
travelCommercePriceService-
-
getTransportOfferingFacade
- Returns:
- the transportOfferingFacade
-
setTransportOfferingFacade
- 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
- Returns:
- the transportOfferingService
-
setTransportOfferingService
- 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
- Returns:
- the travelRulesService
-
setTravelRulesService
- 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
-