Class DefaultRuleActionService
java.lang.Object
de.hybris.platform.ruleengineservices.action.impl.DefaultRuleActionService
- All Implemented Interfaces:
RuleActionService
- Direct Known Subclasses:
DefaultPromotionRuleActionService
Default implementation of
RuleActionService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyAllActions(RuleEngineResultRAO ruleEngineResultRAO) Takes a RuleEngineResultRAO as argument and gets list of its Actions, then for each Action applies corresponding RuleActionStrategy specified by its strategy field.protected RuleActionStrategygetRuleActionStrategy(String strategyKey) returns theRuleActionStrategydefined in theactionStrategiesMappingattribute of this service by looking up it's hey.protected booleanisActionApplicable(AbstractRuleActionRAO action, Set<AbstractRuleActionRAO> actions) voidsetActionStrategiesMapping(Map<String, RuleActionStrategy> actionStrategiesMapping)
-
Constructor Details
-
DefaultRuleActionService
public DefaultRuleActionService()
-
-
Method Details
-
applyAllActions
Takes a RuleEngineResultRAO as argument and gets list of its Actions, then for each Action applies corresponding RuleActionStrategy specified by its strategy field.- Specified by:
applyAllActionsin interfaceRuleActionService- Parameters:
ruleEngineResultRAO- contains Actions- Returns:
- list of
ItemModel(or it subclasses) as a result of the Actions application.
-
isActionApplicable
protected boolean isActionApplicable(AbstractRuleActionRAO action, Set<AbstractRuleActionRAO> actions) -
getRuleActionStrategy
returns theRuleActionStrategydefined in theactionStrategiesMappingattribute of this service by looking up it's hey.- Parameters:
strategyKey- the key of the RuleActionStrategy to look up- Returns:
- the found bean id
- Throws:
IllegalArgumentException- if the requested strategy cannot be foundIllegalStateException- if this method is called but no strategies are configured
-
getActionStrategiesMapping
-
setActionStrategiesMapping
-