public interface BundleRuleService
ChangeProductPriceBundleRuleModel or information about whether it is disabled
DisableProductBundleRuleModel when part of a bundle. The rules are depending on the other products in the
same bundle in the cart or newly products to add. These are the different ways on how to find a rule:
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
createMessageForDisableRule(DisableProductBundleRuleModel disableRule,
ProductModel product)
Generates the message explaining why given product is disabled with specific rule.
|
ChangeProductPriceBundleRuleModel |
getChangePriceBundleRule(AbstractOrderModel masterAbstractOrder,
BundleTemplateModel bundleTemplate,
ProductModel targetProduct,
int bundleNo)
Deprecated.
since 6.5 - bundleNo parameter is deprecated, should be replaced with entry groups
|
ChangeProductPriceBundleRuleModel |
getChangePriceBundleRule(BundleTemplateModel targetComponent,
ProductModel targetProduct,
ProductModel conditionalProduct,
CurrencyModel currency)
Returns a
ChangeProductPriceBundleRuleModel valid for the given targetProduct. |
ChangeProductPriceBundleRuleModel |
getChangePriceBundleRuleForOrderEntry(AbstractOrderEntryModel orderEntryModel)
Returns a
ChangeProductPriceBundleRuleModel valid for the given orderEntryModel. |
ChangeProductPriceBundleRuleModel |
getChangePriceBundleRuleWithLowestPrice(ProductModel targetProduct,
CurrencyModel currency)
Searches for the lowest price
ChangeProductPriceBundleRuleModel of the given targetProduct in
any bundle package |
java.util.List<DisableProductBundleRuleModel> |
getDisableProductBundleRules(ProductModel product,
EntryGroup entryGroup,
AbstractOrderModel order)
|
DisableProductBundleRuleModel |
getDisableRuleForBundleProduct(AbstractOrderModel masterAbstractOrder,
ProductModel product,
BundleTemplateModel bundleTemplate,
int bundleNo,
boolean ignoreCurrentProducts)
Deprecated.
since 6.5 - bundleNo parameter is deprecated, should be replaced with entry groups
|
DisableProductBundleRuleModel |
getDisableRuleForBundleProduct(BundleTemplateModel bundleTemplate,
ProductModel product1,
ProductModel product2)
Returns a
DisableProductBundleRuleModel which does not allow that the given products product1
and product2 are added together to a bundle. |
ChangeProductPriceBundleRuleModel getChangePriceBundleRuleForOrderEntry(AbstractOrderEntryModel orderEntryModel)
ChangeProductPriceBundleRuleModel valid for the given orderEntryModel. The method
calculates the lowest product price for the product in the given orderEntryModel which 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)orderEntryModel - entry that is added to the cart as part of a bundleChangeProductPriceBundleRuleModel if existing or nullChangeProductPriceBundleRuleModel getChangePriceBundleRule(BundleTemplateModel targetComponent, ProductModel targetProduct, ProductModel conditionalProduct, CurrencyModel currency)
ChangeProductPriceBundleRuleModel valid for the given targetProduct. The method
calculates (forecasts) the lowest product price for the given targetProduct which shall be added to a
bundle based on the given bundle template (targetComponent) in combination with the given
conditionalProduct. The bundle or a cart to which the given products should be added may or may not
yet exist. The method just forecasts the possible price for the given combination of input parameters.targetComponent - bundle template based on which the given targetProduct is or shall be added to a bundletargetProduct - product that is added to a bundle and for which the product price is calculatedconditionalProduct - second product that is added to the same bundle as the given targetProduct and that is the
condition for a ChangeProductPriceBundleRuleModel to be selectedcurrency - the currency the ChangeProductPriceBundleRuleModel must match to be selectedChangeProductPriceBundleRuleModel if existing or null@Deprecated DisableProductBundleRuleModel getDisableRuleForBundleProduct(AbstractOrderModel masterAbstractOrder, ProductModel product, BundleTemplateModel bundleTemplate, int bundleNo, boolean ignoreCurrentProducts)
DisableProductBundleRuleModel valid for the given product ignoring products
ignoreProducts in the cart. The method searches for DisableProductBundleRuleModel's that can
be applied if the given product is or would be added to the given masterAbstractOrder in
the context of the given bundleNo and bundleTemplate.masterAbstractOrder - the master cart/order to which the given product is addedproduct - product that is or shall be added to the bundle and for which applicable
DisableProductBundleRuleModel's are searchedbundleTemplate - bundle template based on which the given product is or shall be added to the bundlebundleNo - the number of the bundle to which the product is or shall be added to a bundleignoreCurrentProducts - if the products in the current bundletemplate should be ignoredDisableProductBundleRuleModel that is found which means that the given
product cannot be added to the bundle in the cart. null if no
DisableProductBundleRuleModel applies and the product can be added to the bundle.@Deprecated ChangeProductPriceBundleRuleModel getChangePriceBundleRule(AbstractOrderModel masterAbstractOrder, BundleTemplateModel bundleTemplate, ProductModel targetProduct, int bundleNo)
ChangeProductPriceBundleRuleModel valid for the given targetProduct. The method
calculates (forecasts) the lowest product price for the given targetProduct which shall be added to a
bundle based on the given bundle template (targetComponent). The price is retrieved from the
ChangeProductPriceBundleRuleModels that can be applied based on the other products in the same bundle. The
method just forecasts the possible price for the given combination of input parameters.masterAbstractOrder - the master cart/order to which the given targetProduct shall be addedtargetProduct - product that shall be added to the bundle and for which applicable DisableProductBundleRuleModel
's are searchedbundleTemplate - bundle template based on which the given targetProduct shall be added to the bundlebundleNo - the number of the bundle to which the targetProduct shall be addedChangeProductPriceBundleRuleModel if existing or nullDisableProductBundleRuleModel getDisableRuleForBundleProduct(BundleTemplateModel bundleTemplate, ProductModel product1, ProductModel product2)
DisableProductBundleRuleModel which does not allow that the given products product1
and product2 are added together to a bundle. In case no such disable rule exists null is
returned.bundleTemplate - bundle template based on which the given targetProduct and conditionalProduct
shall be added to the bundleproduct1 - first product that shall be added to the bundleproduct2 - second product that shall be added to the bundleDisableProductBundleRuleModel that is found which means that the given
product1 and product2 cannot be added together to the bundle in the cart.
null if no DisableProductBundleRuleModel applies and the products can be added to the
bundle.ChangeProductPriceBundleRuleModel getChangePriceBundleRuleWithLowestPrice(ProductModel targetProduct, CurrencyModel currency)
ChangeProductPriceBundleRuleModel of the given targetProduct in
any bundle packagetargetProduct - the product for which the lowest bundle price is searchedcurrency - the currency the ChangeProductPriceBundleRuleModel must match to be selectedChangeProductPriceBundleRuleModel if existing or nulljava.lang.String createMessageForDisableRule(DisableProductBundleRuleModel disableRule, ProductModel product)
disableRule - DisableProductBundleRuleModel which disabled given product for specific conditional productsproduct - Disabled productjava.util.List<DisableProductBundleRuleModel> getDisableProductBundleRules(ProductModel product, EntryGroup entryGroup, AbstractOrderModel order)
DisableProductBundleRuleModel valid for the given product in the given
order. The method searches for DisableProductBundleRuleModels that can
be applied if the given product is or would be added to the given order in the context
of the given entryGroup .product - product that is or shall be added to the bundle and for which applicable
DisableProductBundleRuleModels are searchedentryGroup - entry group representing a bundle to which the product is or shall be addedorder - the cart/order to which the given product is addedDisableProductBundleRuleModel which are blocking adding product cannot be
added to the bundle in the cart.Copyright © 2018 SAP SE. All Rights Reserved.