Class PackageProductPriceHandler
java.lang.Object
de.hybris.platform.travelfacades.facades.packages.handlers.impl.PackageProductPriceHandler
- All Implemented Interfaces:
StandardPackageProductHandler
Concrete implementation of the
StandardPackageProductHandler interface. This handler is responsible to populate the
price for each PackageProductData, if the product is available. The wasRate will be the standard price of the product, the
actualRate will be the price determined by the changeProductPriceBundleRule if it exist, otherwise will be the same as the
wasRate.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DoublecalculateGrossTaxValueForProduct(TaxRowModel tax, Double productBasePrice) protected DoublecalculateNetTaxValueForProduct(TaxRowModel tax, Double productBasePrice) protected de.hybris.platform.configurablebundleservices.bundle.BundleTemplateServiceprotected de.hybris.platform.commerceservices.price.CommercePriceServiceprotected de.hybris.platform.servicelayer.i18n.CommonI18NServiceprotected RateDatagetPriceForProductAndBundle(ProductModel product, BundleTemplateModel bundleTemplate) Returns the RateData properly populated given the productModel and the bundleTemplate.protected de.hybris.platform.product.ProductServicegetTaxes(Collection<TaxRowModel> taxes, String currencyIso, Double productBasePrice) Returns the list of TaxData.getTaxes(Collection<TaxRowModel> taxes, String currencyIso, Double productBasePrice, Boolean isNet) protected TravelCommercePriceFacadevoidhandle(BundleTemplateData bundleTemplate, List<PackageProductData> packageProductDataList) Handle method.voidsetBundleTemplateService(de.hybris.platform.configurablebundleservices.bundle.BundleTemplateService bundleTemplateService) voidsetCommercePriceService(de.hybris.platform.commerceservices.price.CommercePriceService commercePriceService) voidsetCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService) voidsetProductService(de.hybris.platform.product.ProductService productService) voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade)
-
Constructor Details
-
PackageProductPriceHandler
public PackageProductPriceHandler()
-
-
Method Details
-
handle
public void handle(BundleTemplateData bundleTemplate, List<PackageProductData> packageProductDataList) Description copied from interface:StandardPackageProductHandlerHandle method.- Specified by:
handlein interfaceStandardPackageProductHandler- Parameters:
bundleTemplate- the bundle template datapackageProductDataList- the list of package product data list
-
getPriceForProductAndBundle
protected RateData getPriceForProductAndBundle(ProductModel product, BundleTemplateModel bundleTemplate) Returns the RateData properly populated given the productModel and the bundleTemplate. The wasRate is the standard price of the product taken from the priceRow for the current Currency. The actualRate is the price determined by the changeProductPriceBundleRule if it exist, otherwise will be the same as the wasRate.- Parameters:
product- as the productModelbundleTemplate- as the bundleTemplateModel- Returns:
- the RateDate populated based on the given parameters.
-
getTaxes
protected List<TaxData> getTaxes(Collection<TaxRowModel> taxes, String currencyIso, Double productBasePrice) Returns the list of TaxData.- Parameters:
taxes- as the taxescurrencyIso- as the currencyIsoproductBasePrice- as the productBasePrice- Returns:
- the List of TaxData
-
getTaxes
protected List<TaxData> getTaxes(Collection<TaxRowModel> taxes, String currencyIso, Double productBasePrice, Boolean isNet) -
calculateNetTaxValueForProduct
-
calculateGrossTaxValueForProduct
-
getBundleTemplateService
protected de.hybris.platform.configurablebundleservices.bundle.BundleTemplateService getBundleTemplateService()- Returns:
- the bundleTemplateService
-
setBundleTemplateService
public void setBundleTemplateService(de.hybris.platform.configurablebundleservices.bundle.BundleTemplateService bundleTemplateService) - Parameters:
bundleTemplateService- the bundleTemplateService to set
-
getProductService
protected de.hybris.platform.product.ProductService getProductService()- Returns:
- the productService
-
setProductService
public void setProductService(de.hybris.platform.product.ProductService productService) - Parameters:
productService- the productService to set
-
getTravelCommercePriceFacade
- Returns:
- the travelCommercePriceFacade
-
setTravelCommercePriceFacade
- Parameters:
travelCommercePriceFacade- the travelCommercePriceFacade to set
-
getCommercePriceService
protected de.hybris.platform.commerceservices.price.CommercePriceService getCommercePriceService()- Returns:
- the commercePriceService
-
setCommercePriceService
public void setCommercePriceService(de.hybris.platform.commerceservices.price.CommercePriceService commercePriceService) - Parameters:
commercePriceService- the commercePriceService 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
-