Class BundleFindDiscountValuesHook
- java.lang.Object
-
- de.hybris.platform.configurablebundleservices.bundle.impl.BundleFindDiscountValuesHook
-
- All Implemented Interfaces:
FindDiscountValuesHook
public class BundleFindDiscountValuesHook extends java.lang.Object implements FindDiscountValuesHook
-
-
Constructor Summary
Constructors Constructor Description BundleFindDiscountValuesHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DiscountValuecreateDiscountValue(double discountPrice, double basePrice, java.lang.String id, CurrencyModel currency)Creates a DiscountValue with an absolute reduction based on the givenbasePriceand the givendiscountPricejava.util.List<DiscountValue>findDiscountValues(AbstractOrderEntryModel entry)Find applicableDiscountValues for the target order entry.BundleRuleServicegetBundleRuleService()BundleTemplateServicegetBundleTemplateService()booleanisApplicable(AbstractOrderEntryModel entry)Indicates whether a custom base price can be found for the givenAbstractOrderEntryModel.voidsetBundleRuleService(BundleRuleService bundleRuleService)voidsetBundleTemplateService(BundleTemplateService bundleTemplateService)
-
-
-
Method Detail
-
findDiscountValues
public java.util.List<DiscountValue> findDiscountValues(AbstractOrderEntryModel entry)
Description copied from interface:FindDiscountValuesHookFind applicableDiscountValues for the target order entry.- Specified by:
findDiscountValuesin interfaceFindDiscountValuesHook- Returns:
- List of
DiscountValues
-
isApplicable
public boolean isApplicable(AbstractOrderEntryModel entry)
Description copied from interface:FindDiscountValuesHookIndicates whether a custom base price can be found for the givenAbstractOrderEntryModel.- Specified by:
isApplicablein interfaceFindDiscountValuesHook- Parameters:
entry-AbstractOrderEntryModel- Returns:
- whether hook is applicable
-
createDiscountValue
protected DiscountValue createDiscountValue(double discountPrice, double basePrice, java.lang.String id, CurrencyModel currency)
Creates a DiscountValue with an absolute reduction based on the givenbasePriceand the givendiscountPrice- Returns:
DiscountValue
-
setBundleTemplateService
public void setBundleTemplateService(BundleTemplateService bundleTemplateService)
-
getBundleTemplateService
public BundleTemplateService getBundleTemplateService()
-
setBundleRuleService
public void setBundleRuleService(BundleRuleService bundleRuleService)
-
getBundleRuleService
public BundleRuleService getBundleRuleService()
-
-