Class PackageProductPriceHandler

java.lang.Object
de.hybris.platform.travelfacades.facades.packages.handlers.impl.PackageProductPriceHandler
All Implemented Interfaces:
StandardPackageProductHandler

public class PackageProductPriceHandler extends Object implements 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 Details

    • PackageProductPriceHandler

      public PackageProductPriceHandler()
  • Method Details

    • handle

      public void handle(BundleTemplateData bundleTemplate, List<PackageProductData> packageProductDataList)
      Description copied from interface: StandardPackageProductHandler
      Handle method.
      Specified by:
      handle in interface StandardPackageProductHandler
      Parameters:
      bundleTemplate - the bundle template data
      packageProductDataList - 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 productModel
      bundleTemplate - 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 taxes
      currencyIso - as the currencyIso
      productBasePrice - as the productBasePrice
      Returns:
      the List of TaxData
    • getTaxes

      protected List<TaxData> getTaxes(Collection<TaxRowModel> taxes, String currencyIso, Double productBasePrice, Boolean isNet)
    • calculateNetTaxValueForProduct

      protected Double calculateNetTaxValueForProduct(TaxRowModel tax, Double productBasePrice)
    • calculateGrossTaxValueForProduct

      protected Double calculateGrossTaxValueForProduct(TaxRowModel tax, Double productBasePrice)
    • 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

      protected TravelCommercePriceFacade getTravelCommercePriceFacade()
      Returns:
      the travelCommercePriceFacade
    • setTravelCommercePriceFacade

      public void setTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade)
      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