Class DefaultBundleRuleService
java.lang.Object
de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleCommerceRuleService
de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleRuleService
- All Implemented Interfaces:
BundleRuleService
Default implementation of the bundle rule service
BundleRuleService. 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 -
Method Summary
Modifier and TypeMethodDescriptioncreateMessageForDisableRule(DisableProductBundleRuleModel disableRule, ProductModel product) Generates the message explaining why given product is disabled with specific rule.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
-
Constructor Details
-
DefaultBundleRuleService
public DefaultBundleRuleService()
-
-
Method Details
-
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 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
-