Class DefaultBundleRuleService
- java.lang.Object
-
- de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleCommerceRuleService
-
- de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleRuleService
-
- All Implemented Interfaces:
BundleRuleService
public class DefaultBundleRuleService extends DefaultBundleCommerceRuleService
Default implementation of the bundle rule serviceBundleRuleService. It uses Flexible Search queries and Java Code to find the lowest price (based on bundle price rules) for a product that is or will be part of a bundle.
-
-
Constructor Summary
Constructors Constructor Description DefaultBundleRuleService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcreateMessageForDisableRule(DisableProductBundleRuleModel disableRule, ProductModel product)Generates the message explaining why given product is disabled with specific rule.ChangeProductPriceBundleRuleModelgetChangePriceBundleRuleForOrderEntry(AbstractOrderEntryModel entry)Returns aChangeProductPriceBundleRuleModelvalid for the givenorderEntryModel.-
Methods inherited from class de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleCommerceRuleService
checkBundleRuleForConditionalProduct, checkBundleRuleForTargetProduct, checkRuleIsFulfilled, evaluateBundleRules, getBundleTemplateService, getCartProductsInSameBundle, getChangePriceBundleRule, getChangePriceBundleRuleWithLowestPrice, getChangeProductPriceBundleRuleDao, getDisableProductBundleRuleDao, getDisableProductBundleRules, getDisableRuleForBundleProduct, getDisableRuleForBundleProduct, getEntryGroupService, getL10NService, getLowestPriceForTargetProductAndTemplate, getModelService, getSearchRestrictionService, getSessionService, setBundleTemplateService, setChangeProductPriceBundleRuleDao, setDisableProductBundleRuleDao, setEntryGroupService, setL10NService, setModelService, setSearchRestrictionService, setSessionService, unrestricted
-
-
-
-
Method Detail
-
getChangePriceBundleRuleForOrderEntry
@Nullable public ChangeProductPriceBundleRuleModel getChangePriceBundleRuleForOrderEntry(@Nonnull AbstractOrderEntryModel entry)
Description copied from interface:BundleRuleServiceReturns aChangeProductPriceBundleRuleModelvalid for the givenorderEntryModel. The method calculates the lowest product price for the product in the givenorderEntryModelwhich is added to a bundle. The calculation is based on the entry's bundle template and the other products in the same bundle (conditional products)- Specified by:
getChangePriceBundleRuleForOrderEntryin interfaceBundleRuleService- Overrides:
getChangePriceBundleRuleForOrderEntryin classDefaultBundleCommerceRuleService- Parameters:
entry- entry that is added to the cart as part of a bundle- Returns:
- a
ChangeProductPriceBundleRuleModelif existing or null
-
createMessageForDisableRule
public java.lang.String createMessageForDisableRule(DisableProductBundleRuleModel disableRule, ProductModel product)
Description copied from interface:BundleRuleServiceGenerates the message explaining why given product is disabled with specific rule.- Specified by:
createMessageForDisableRulein interfaceBundleRuleService- Overrides:
createMessageForDisableRulein classDefaultBundleCommerceRuleService- Parameters:
disableRule-DisableProductBundleRuleModelwhich disabled given product for specific conditional productsproduct- Disabled product- Returns:
- Message about the disable rule for given product
-
-