Class EngineRulePreconditions
java.lang.Object
de.hybris.platform.ruleengine.util.EngineRulePreconditions
Preconditions check methods for
AbstractRuleEngineRuleModel subclasses-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends AbstractRuleEngineRuleModel>
voidcheckRuleHasKieModule(T rule) Verify if the engine rule is associated with any KIE module, throwIllegalStateExceptionotherwisestatic <T extends AbstractRuleEngineRuleModel>
voidcheckRulesHaveSameType(Collection<T> engineRules) Verify if all the rules in the collection are of the same type.
-
Method Details
-
checkRulesHaveSameType
public static <T extends AbstractRuleEngineRuleModel> void checkRulesHaveSameType(Collection<T> engineRules) Verify if all the rules in the collection are of the same type. ThrowIllegalStateExceptionotherwise- Type Parameters:
T- type of the engine rule- Parameters:
engineRules- collection of engine rules- Throws:
IllegalStateException- if rule type is not the same
-
checkRuleHasKieModule
Verify if the engine rule is associated with any KIE module, throwIllegalStateExceptionotherwise- Type Parameters:
T- type of the engine rule- Parameters:
rule- engine rule to check- Throws:
IllegalStateException- if any given rule has no KIE module
-