public class DefaultPromotionEngineService extends java.lang.Object implements PromotionEngineService, PromotionsService
| Constructor and Description |
|---|
DefaultPromotionEngineService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupAbstractOrder(AbstractOrderModel cart) |
void |
cleanupCart(CartModel cart)
Delete the the stored promotion results for a Cart.
|
protected AbstractRuleEngineContextModel |
determineRuleEngineContext(AbstractOrderModel order)
determines the rule engine context to be used for the given order.
|
protected AbstractRuleEngineContextModel |
determineRuleEngineContext(ProductModel product)
determines the rule engine context to be used for the given product.
|
RuleEvaluationResult |
evaluate(AbstractOrderModel order,
java.util.Collection<PromotionGroupModel> promotionGroups)
evaluate the promotions for the given cart or order and for now.
|
RuleEvaluationResult |
evaluate(AbstractOrderModel order,
java.util.Collection<PromotionGroupModel> promotionGroups,
java.util.Date date)
evaluate the promotions for the given cart or order and for the date.
|
RuleEvaluationResult |
evaluate(ProductModel product,
java.util.Collection<PromotionGroupModel> promotionGroups)
Evaluates promotion against a product taking into context which is set by promotions group
|
protected <T> T |
findImmutablePromotionByUniqueKey(java.lang.String immutableKeyHash,
java.util.function.Predicate<T> immutableKeyPredicate) |
java.util.List<? extends AbstractPromotionModel> |
getAbstractProductPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
ProductModel product)
Get the ordered list of
AbstractPromotionModel instances that are related to the ProductModel
specified. |
java.util.List<? extends AbstractPromotionModel> |
getAbstractProductPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
ProductModel product,
boolean evaluateRestrictions,
java.util.Date date)
Get the ordered list of
AbstractPromotionModel instances that are related to the ProductModel
specified. |
protected CalculationService |
getCalculationService() |
protected CatalogVersionService |
getCatalogVersionService() |
protected java.util.Set<java.lang.String> |
getCategoryCodesForProduct(ProductModel product) |
protected CategoryService |
getCategoryService() |
protected RuleEngineService |
getCommerceRuleEngineService() |
protected ConfigurationService |
getConfigurationService() |
protected java.lang.String |
getDataUniqueKey(AbstractPromotionModel sourcePromotion) |
PromotionGroupModel |
getDefaultPromotionGroup()
Lookup the default promotion group created by the promotions extension.
|
DefaultPromotionsService |
getDefaultPromotionsService() |
protected EngineRuleDao |
getEngineRuleDao() |
protected FactContextFactory |
getFactContextFactory() |
protected FlexibleSearchService |
getFlexibleSearchService() |
protected ModelService |
getModelService() |
java.util.List<OrderPromotionModel> |
getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups)
Get the ordered list of
OrderPromotion instances. |
java.util.List<OrderPromotionModel> |
getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
boolean evaluateRestrictions)
Get the ordered list of
OrderPromotion instances. |
java.util.List<OrderPromotionModel> |
getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
boolean evaluateRestrictions,
java.util.Date date)
Get the ordered list of
OrderPromotion instances. |
java.util.List<OrderPromotionModel> |
getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
boolean evaluateRestrictions,
ProductModel product)
Get the ordered list of
OrderPromotion instances. |
java.util.List<OrderPromotionModel> |
getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
boolean evaluateRestrictions,
ProductModel product,
java.util.Date date)
Get the ordered list of
OrderPromotion instances. |
java.util.List<OrderPromotionModel> |
getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
java.util.Date date)
Get the ordered list of
OrderPromotion instances. |
java.util.List<OrderPromotionModel> |
getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
ProductModel product)
Get the ordered list of
OrderPromotion instances. |
java.util.List<OrderPromotionModel> |
getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
ProductModel product,
java.util.Date date)
Get the ordered list of
OrderPromotion instances. |
java.util.List<ProductPromotionModel> |
getProductPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
ProductModel product)
Get the ordered list of
ProductPromotion instances that are related to the ProductModel specified. |
java.util.List<ProductPromotionModel> |
getProductPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
ProductModel product,
boolean evaluateRestrictions,
java.util.Date date)
Get the ordered list of
ProductPromotion instances that are related to the ProductModel specified. |
protected ProductUtils |
getProductUtils() |
protected PromotionDao |
getPromotionDao() |
java.lang.String |
getPromotionDescription(AbstractPromotionModel promotion)
Get the description of given promotion.
|
PromotionGroupModel |
getPromotionGroup(java.lang.String identifier)
Lookup a promotion group with the given identifier.
|
PromotionOrderResults |
getPromotionResults(AbstractOrderModel order)
Get the promotion results for the specified order.
|
PromotionOrderResults |
getPromotionResults(java.util.Collection<PromotionGroupModel> promotionGroups,
AbstractOrderModel order,
boolean evaluateRestrictions,
PromotionsManager.AutoApplyMode productPromotionMode,
PromotionsManager.AutoApplyMode orderPromotionMode,
java.util.Date date)
Get the promotion results for the specified order.
|
protected java.util.ArrayList<RuleBasedPromotionModel> |
getPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
ProductModel product) |
protected java.util.List<RuleBasedPromotionModel> |
getPromotionsForProduct(java.util.Collection<PromotionGroupModel> promotionGroups,
ProductModel product)
Get all promotions, sorted by priority, that could be applied for the given product and promotion groups.
|
protected PromotionSourceRuleDao |
getPromotionSourceRuleDao() |
java.util.Collection<AbstractPromotionRestrictionModel> |
getRestrictions(AbstractPromotionModel promotion)
Get the collection of
AbstractPromotionRestrictionModel instances. |
protected RuleActionService |
getRuleActionService() |
protected RuleActionStrategy |
getRuleActionStrategy(java.lang.String strategyId)
returns the
RuleActionStrategy defined in the strategies attribute of this service by looking up
it's bean id. |
protected RuleBasedPromotionsContextValidator |
getRuleBasedPromotionsContextValidator() |
protected RuleEngineContextDao |
getRuleEngineContextDao() |
protected RuleEngineContextFinderStrategy |
getRuleEngineContextFinderStrategy() |
protected RuleEngineContextForCatalogVersionsFinderStrategy |
getRuleEngineContextForCatalogVersionsFinderStrategy() |
protected SessionService |
getSessionService() |
protected java.util.List<RuleActionStrategy> |
getStrategies() |
protected TimeService |
getTimeService() |
protected boolean |
isApplicable(ProductModel product,
RuleBasedPromotionModel promotion) |
protected RuleEvaluationContext |
prepareContext(FactContext factContext,
AbstractRuleEngineContextModel ruleEngineContext)
Sets up the rule evaluation context using the provided factContext with facts and rao providers and sets the given
ruleEngineContext.
|
protected java.util.Set<java.lang.Object> |
provideRAOs(FactContext factContext)
Converts the given
source object into an RAO using the configured raoProviders. |
protected boolean |
recalculateCart(AbstractOrderModel order) |
void |
setCalculationService(CalculationService calculationService) |
void |
setCatalogVersionService(CatalogVersionService catalogVersionService) |
void |
setCategoryService(CategoryService categoryService) |
void |
setCommerceRuleEngineService(RuleEngineService ruleEngineService) |
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setDefaultPromotionsService(DefaultPromotionsService defaultPromotionsService) |
void |
setEngineRuleDao(EngineRuleDao engineRuleDao) |
void |
setFactContextFactory(FactContextFactory factContextFactory) |
void |
setFlexibleSearchService(FlexibleSearchService flexibleSearchService) |
void |
setModelService(ModelService modelService) |
void |
setProductUtils(ProductUtils productUtils) |
void |
setPromotionDao(PromotionDao promotionDao) |
void |
setPromotionSourceRuleDao(PromotionSourceRuleDao promotionSourceRuleDao) |
void |
setRuleActionService(RuleActionService ruleActionService) |
void |
setRuleBasedPromotionsContextValidator(RuleBasedPromotionsContextValidator ruleBasedPromotionsContextValidator) |
void |
setRuleEngineContextDao(RuleEngineContextDao ruleEngineContextDao) |
void |
setRuleEngineContextFinderStrategy(RuleEngineContextFinderStrategy ruleEngineContextFinderStrategy) |
void |
setRuleEngineContextForCatalogVersionsFinderStrategy(RuleEngineContextForCatalogVersionsFinderStrategy ruleEngineContextForCatalogVersionsFinderStrategy) |
void |
setSessionService(SessionService sessionService) |
void |
setStrategies(java.util.List<RuleActionStrategy> strategies) |
void |
setTimeService(TimeService timeService) |
void |
transferPromotionsToOrder(AbstractOrderModel source,
OrderModel target,
boolean onlyTransferAppliedPromotions)
Transfer the promotions applied to a cart to a new order.
|
protected void |
undoPromotionAction(AbstractPromotionActionModel action) |
PromotionOrderResults |
updatePromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
AbstractOrderModel order)
Update the promotions on the specified
AbstractOrder object. |
PromotionOrderResults |
updatePromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
AbstractOrderModel order,
boolean evaluateRestrictions,
PromotionsManager.AutoApplyMode productPromotionMode,
PromotionsManager.AutoApplyMode orderPromotionMode,
java.util.Date date)
Update the promotions on the specified
AbstractOrderModel object. |
protected PromotionOrderResults |
updatePromotionsNotThreadSafe(java.util.Collection<PromotionGroupModel> promotionGroups,
AbstractOrderModel order) |
protected PromotionOrderResults |
updatePromotionsNotThreadSafe(java.util.Collection<PromotionGroupModel> promotionGroups,
AbstractOrderModel order,
java.util.Date date) |
public RuleEvaluationResult evaluate(ProductModel product, java.util.Collection<PromotionGroupModel> promotionGroups)
PromotionEngineServiceevaluate in interface PromotionEngineServiceproduct - to evaluate promotions forpromotionGroups - collection of promotion groups to apply promotions forpublic RuleEvaluationResult evaluate(AbstractOrderModel order, java.util.Collection<PromotionGroupModel> promotionGroups)
PromotionEngineServiceevaluate in interface PromotionEngineServiceorder - the cart or order to evaluatepromotionGroups - collection of promotion groups to apply promotions forpublic RuleEvaluationResult evaluate(AbstractOrderModel order, java.util.Collection<PromotionGroupModel> promotionGroups, java.util.Date date)
PromotionEngineServiceevaluate in interface PromotionEngineServiceorder - the cart or order to evaluatepromotionGroups - collection of promotion groups to apply promotions fordate - the moment of evaluationprotected RuleEvaluationContext prepareContext(FactContext factContext, AbstractRuleEngineContextModel ruleEngineContext)
factContext - FactContext to use for the evaluationruleEngineContext - the rule engine context to be used during rule evaluationprotected AbstractRuleEngineContextModel determineRuleEngineContext(AbstractOrderModel order)
RuleEngineContextFinderStrategy.findRuleEngineContext(AbstractOrderModel, RuleType) to
determine the rule engine context to be used.order - the order to be usedprotected AbstractRuleEngineContextModel determineRuleEngineContext(ProductModel product)
RuleEngineContextFinderStrategy.findRuleEngineContext(ProductModel, RuleType) to determine the rule engine
context to be used.product - the product to be usedprotected java.util.Set<java.lang.Object> provideRAOs(FactContext factContext)
source object into an RAO using the configured raoProviders.factContext - FactContext containing rao providersjava.lang.RuntimeException - if no raoProvider is registered for the given source objectpublic java.util.List<? extends AbstractPromotionModel> getAbstractProductPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, ProductModel product)
PromotionsServiceAbstractPromotionModel instances that are related to the ProductModel
specified.getAbstractProductPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateproduct - The product that the promotions are related toAbstractPromotionModel related to the ProductModel specifiedpublic java.util.List<? extends AbstractPromotionModel> getAbstractProductPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, ProductModel product, boolean evaluateRestrictions, java.util.Date date)
PromotionsServiceAbstractPromotionModel instances that are related to the ProductModel
specified.getAbstractProductPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateproduct - The product that the promotions are related toevaluateRestrictions - Flag, pass false to ignore any restrictions specified on the promotions, pass true to observe the
restrictions.date - The date to check for promotions, typically the current dateAbstractPromotionModel related to the ProductModel specifiedpublic java.util.List<ProductPromotionModel> getProductPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, ProductModel product)
PromotionsServiceProductPromotion instances that are related to the ProductModel specified.getProductPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateproduct - The product that the promotions are related toProductPromotion related to the ProductModel specifiedpublic java.util.List<ProductPromotionModel> getProductPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, ProductModel product, boolean evaluateRestrictions, java.util.Date date)
PromotionsServiceProductPromotion instances that are related to the ProductModel specified.getProductPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateproduct - The product that the promotions are related toevaluateRestrictions - Flag, pass false to ignore any restrictions specified on the promotions, pass true to observe the
restrictions.date - The date to check for promotions, typically the current dateProductPromotion related to the ProductModel specifiedpublic java.util.List<OrderPromotionModel> getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups)
PromotionsServiceOrderPromotion instances.getOrderPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateOrderPromotionpublic java.util.List<OrderPromotionModel> getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, java.util.Date date)
PromotionsServiceOrderPromotion instances.getOrderPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluatedate - The date to check for promotions, typically the current dateOrderPromotionpublic java.util.List<OrderPromotionModel> getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, ProductModel product)
PromotionsServiceOrderPromotion instances.getOrderPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateproduct - The product to pass to restrictionsOrderPromotionpublic java.util.List<OrderPromotionModel> getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, ProductModel product, java.util.Date date)
PromotionsServiceOrderPromotion instances.getOrderPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateproduct - The product to pass to restrictionsdate - The date to check for promotions, typically the current dateOrderPromotionpublic java.util.List<OrderPromotionModel> getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, boolean evaluateRestrictions)
PromotionsServiceOrderPromotion instances.getOrderPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateevaluateRestrictions - Flag, pass false to ignore any restrictions specified on the promotions, pass true to observe the
restrictions.OrderPromotionpublic java.util.List<OrderPromotionModel> getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, boolean evaluateRestrictions, java.util.Date date)
PromotionsServiceOrderPromotion instances.getOrderPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateevaluateRestrictions - Flag, pass false to ignore any restrictions specified on the promotions, pass true to observe the
restrictions.date - The date to check for promotions, typically the current dateOrderPromotionpublic java.util.List<OrderPromotionModel> getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, boolean evaluateRestrictions, ProductModel product)
PromotionsServiceOrderPromotion instances.getOrderPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateevaluateRestrictions - Flag, pass false to ignore any restrictions specified on the promotions, pass true to observe the
restrictions.product - The product to pass to restrictions if evaluateRestrictions is trueOrderPromotionpublic java.util.List<OrderPromotionModel> getOrderPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, boolean evaluateRestrictions, ProductModel product, java.util.Date date)
PromotionsServiceOrderPromotion instances.getOrderPromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateevaluateRestrictions - Flag, pass false to ignore any restrictions specified on the promotions, pass true to observe the
restrictions.product - The product to pass to restrictions if evaluateRestrictions is truedate - The date to check for promotions, typically the current dateOrderPromotionpublic PromotionOrderResults updatePromotions(java.util.Collection<PromotionGroupModel> promotionGroups, AbstractOrderModel order)
PromotionsServiceAbstractOrder object.
This method will automatically apply all possible product promotional updates to the cart, but not apply order
level promotions. Any previously applied order level promotions will remain applied. Promotions are evaluated at
the current system time.
The promotion results are stored in the database and the same PromotionOrderResults can be obtained later
by calling PromotionsService.getPromotionResults(de.hybris.platform.core.model.order.AbstractOrderModel).updatePromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateorder - The order object to update with the results of the promotionsprotected PromotionOrderResults updatePromotionsNotThreadSafe(java.util.Collection<PromotionGroupModel> promotionGroups, AbstractOrderModel order)
protected PromotionOrderResults updatePromotionsNotThreadSafe(java.util.Collection<PromotionGroupModel> promotionGroups, AbstractOrderModel order, java.util.Date date)
public PromotionOrderResults updatePromotions(java.util.Collection<PromotionGroupModel> promotionGroups, AbstractOrderModel order, boolean evaluateRestrictions, PromotionsManager.AutoApplyMode productPromotionMode, PromotionsManager.AutoApplyMode orderPromotionMode, java.util.Date date)
PromotionsServiceAbstractOrderModel object.
The resulting promotions can be retrieved later by calling PromotionsService.getPromotionResults(de.hybris.platform.core.model.order.AbstractOrderModel). The order must be
calculated before calling this method. PromotionsService.updatePromotions(java.util.Collection<de.hybris.platform.promotions.model.PromotionGroupModel>, de.hybris.platform.core.model.order.AbstractOrderModel) must be called after calling
AbstractOrder.recalculate() on the AbstractOrderModel. Where the PromotionsManager.AutoApplyMode is set to
PromotionsManager.AutoApplyMode.KEEP_APPLIED the state of any previously applied PromotionResult is recorded and if
it is still in the fired state (PromotionResult.isApplied()) after reevaluating the promotions it will be
automatically reapplied.
The promotion results are stored in the database and the same PromotionOrderResults can be obtained later
by calling PromotionsService.getPromotionResults(de.hybris.platform.core.model.order.AbstractOrderModel). After this method is called, please call getModelService().refresh(order)
or getModelService().save(order).updatePromotions in interface PromotionsServicepromotionGroups - The promotion groups to evaluateorder - The AbstractOrder object to update the promotions forevaluateRestrictions - If true any promotion restrictions will be observed, if false all promotion restrictions
are ignoredproductPromotionMode - The auto apply mode. This determines whether this method applies any product promotional changes to line
items or discounts to the overall amountorderPromotionMode - The auto apply mode. This determines whether this method applies any order promotional changes to line
items or discounts to the overall amountdate - The effective date for the promotions to check. Use this to to see the effects of promotions in the past
or future.public PromotionOrderResults getPromotionResults(AbstractOrderModel order)
PromotionsServicePromotionsService.updatePromotions(java.util.Collection<de.hybris.platform.promotions.model.PromotionGroupModel>, de.hybris.platform.core.model.order.AbstractOrderModel) for the same order.
If any of the promotion results are invalid then they will be ignored.getPromotionResults in interface PromotionsServiceorder - The order to get the promotion results forpublic PromotionOrderResults getPromotionResults(java.util.Collection<PromotionGroupModel> promotionGroups, AbstractOrderModel order, boolean evaluateRestrictions, PromotionsManager.AutoApplyMode productPromotionMode, PromotionsManager.AutoApplyMode orderPromotionMode, java.util.Date date)
PromotionsServicePromotionsService.updatePromotions(java.util.Collection<de.hybris.platform.promotions.model.PromotionGroupModel>, de.hybris.platform.core.model.order.AbstractOrderModel) for the same order.
If any of the promotion results are invalid then this method will recalculate the promotions by calling
PromotionsService.updatePromotions(java.util.Collection<de.hybris.platform.promotions.model.PromotionGroupModel>, de.hybris.platform.core.model.order.AbstractOrderModel).getPromotionResults in interface PromotionsServicepromotionGroups - The promotion groups to evaluateorder - The AbstractOrder object to get the promotions forevaluateRestrictions - If true any promotion restrictions will be observed, if false all promotion restrictions
are ignoredproductPromotionMode - The auto apply mode. This determines whether this method applies any product promotional changes to line
items or discounts to the overall amountorderPromotionMode - The auto apply mode. This determines whether this method applies any order promotional changes to line
items or discounts to the overall amountdate - The effective date for the promotions to check. Use this to to see the effects of promotions in the past
or future.public void cleanupCart(CartModel cart)
PromotionsServicecleanupCart in interface PromotionsServicecart - The Cart to delete the results forprotected void cleanupAbstractOrder(AbstractOrderModel cart)
protected void undoPromotionAction(AbstractPromotionActionModel action)
public void transferPromotionsToOrder(AbstractOrderModel source, OrderModel target, boolean onlyTransferAppliedPromotions)
PromotionsServicetransferPromotionsToOrder in interface PromotionsServicesource - The cart that has promotionstarget - The order that promotions should be applied toonlyTransferAppliedPromotions - Flag to indicate that only applied promotions should be transfered. If false all promotion results will
be transferedprotected java.lang.String getDataUniqueKey(AbstractPromotionModel sourcePromotion)
protected <T> T findImmutablePromotionByUniqueKey(java.lang.String immutableKeyHash,
java.util.function.Predicate<T> immutableKeyPredicate)
public PromotionGroupModel getDefaultPromotionGroup()
PromotionsServicegetDefaultPromotionGroup in interface PromotionsServicepublic PromotionGroupModel getPromotionGroup(java.lang.String identifier)
PromotionsServicegetPromotionGroup in interface PromotionsServiceidentifier - identifier of the promotion group to look forpublic java.util.Collection<AbstractPromotionRestrictionModel> getRestrictions(AbstractPromotionModel promotion)
PromotionsServiceAbstractPromotionRestrictionModel instances.getRestrictions in interface PromotionsServicepromotion - the promotion which restrictions should be returnedAbstractPromotionRestrictionModel instances attached to this promotion.public java.lang.String getPromotionDescription(AbstractPromotionModel promotion)
PromotionsServicegetPromotionDescription in interface PromotionsServicepromotion - the promotion to get the description forprotected RuleActionStrategy getRuleActionStrategy(java.lang.String strategyId)
RuleActionStrategy defined in the strategies attribute of this service by looking up
it's bean id.strategyId - the bean id of the RuleActionStrategy to look upprotected java.util.List<RuleActionStrategy> getStrategies()
public void setStrategies(java.util.List<RuleActionStrategy> strategies)
protected boolean recalculateCart(AbstractOrderModel order)
protected EngineRuleDao getEngineRuleDao()
public void setEngineRuleDao(EngineRuleDao engineRuleDao)
protected FlexibleSearchService getFlexibleSearchService()
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
protected PromotionDao getPromotionDao()
public void setPromotionDao(PromotionDao promotionDao)
protected FactContextFactory getFactContextFactory()
public void setFactContextFactory(FactContextFactory factContextFactory)
public DefaultPromotionsService getDefaultPromotionsService()
public void setDefaultPromotionsService(DefaultPromotionsService defaultPromotionsService)
protected RuleEngineService getCommerceRuleEngineService()
public void setCommerceRuleEngineService(RuleEngineService ruleEngineService)
protected CalculationService getCalculationService()
public void setCalculationService(CalculationService calculationService)
protected RuleActionService getRuleActionService()
public void setRuleActionService(RuleActionService ruleActionService)
protected RuleEngineContextDao getRuleEngineContextDao()
public void setRuleEngineContextDao(RuleEngineContextDao ruleEngineContextDao)
protected java.util.List<RuleBasedPromotionModel> getPromotionsForProduct(java.util.Collection<PromotionGroupModel> promotionGroups, ProductModel product)
promotionGroups - collection of promotion groups to apply promotions forproduct - product to get promotions forRuleBasedPromotionModel which could be applied to the given product and are sorted by
priority or empty list if promotionengineservices.getpromotionsforproduct.disable is set to trueprotected java.util.ArrayList<RuleBasedPromotionModel> getPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, ProductModel product)
protected boolean isApplicable(ProductModel product, RuleBasedPromotionModel promotion)
protected java.util.Set<java.lang.String> getCategoryCodesForProduct(ProductModel product)
protected PromotionSourceRuleDao getPromotionSourceRuleDao()
public void setPromotionSourceRuleDao(PromotionSourceRuleDao promotionSourceRuleDao)
protected CategoryService getCategoryService()
public void setCategoryService(CategoryService categoryService)
protected ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
protected CatalogVersionService getCatalogVersionService()
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
protected RuleEngineContextForCatalogVersionsFinderStrategy getRuleEngineContextForCatalogVersionsFinderStrategy()
public void setRuleEngineContextForCatalogVersionsFinderStrategy(RuleEngineContextForCatalogVersionsFinderStrategy ruleEngineContextForCatalogVersionsFinderStrategy)
protected RuleEngineContextFinderStrategy getRuleEngineContextFinderStrategy()
public void setRuleEngineContextFinderStrategy(RuleEngineContextFinderStrategy ruleEngineContextFinderStrategy)
protected RuleBasedPromotionsContextValidator getRuleBasedPromotionsContextValidator()
public void setRuleBasedPromotionsContextValidator(RuleBasedPromotionsContextValidator ruleBasedPromotionsContextValidator)
protected SessionService getSessionService()
public void setSessionService(SessionService sessionService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected TimeService getTimeService()
public void setTimeService(TimeService timeService)
protected ProductUtils getProductUtils()
public void setProductUtils(ProductUtils productUtils)
Copyright © 2018 SAP SE. All Rights Reserved.