Class EngineRulePreconditions
- java.lang.Object
-
- de.hybris.platform.ruleengine.util.EngineRulePreconditions
-
public class EngineRulePreconditions extends java.lang.ObjectPreconditions check methods forAbstractRuleEngineRuleModelsubclasses
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T extends AbstractRuleEngineRuleModel>
voidcheckRuleHasKieModule(T rule)Verify if the engine rule is associated with any KIE module, throwIllegalStateExceptionotherwisestatic <T extends SourceRuleModel>
voidcheckRulesCanBePublished(java.util.Collection<T> engineRules)Deprecated, for removal: This API element is subject to removal in a future version.since 1811static <T extends SourceRuleModel>
voidcheckRulesCanBeUndeployed(java.util.Collection<T> engineRules)Deprecated, for removal: This API element is subject to removal in a future version.since 1811static <T extends AbstractRuleEngineRuleModel>
voidcheckRulesHaveSameType(java.util.Collection<T> engineRules)Verify if all the rules in the collection are of the same type.
-
-
-
Method Detail
-
checkRulesHaveSameType
public static <T extends AbstractRuleEngineRuleModel> void checkRulesHaveSameType(java.util.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:
java.lang.IllegalStateException- if rule type is not the same
-
checkRulesCanBeUndeployed
@Deprecated(since="1811", forRemoval=true) public static <T extends SourceRuleModel> void checkRulesCanBeUndeployed(java.util.Collection<T> engineRules)Deprecated, for removal: This API element is subject to removal in a future version.since 1811Verify if all the rules in the collection can be undeployed. ThrowIllegalStateExceptionotherwise- Type Parameters:
T- type of the engine rule- Parameters:
engineRules- collection of source rulesSourceRuleModel- Throws:
java.lang.IllegalStateException- if rule status isRuleStatus.ARCHIVED
-
checkRulesCanBePublished
@Deprecated(since="1811", forRemoval=true) public static <T extends SourceRuleModel> void checkRulesCanBePublished(java.util.Collection<T> engineRules)Deprecated, for removal: This API element is subject to removal in a future version.since 1811Verify if all the rules in the collection can be published. ThrowIllegalStateExceptionotherwise- Type Parameters:
T- type of the engine rule- Parameters:
engineRules- collection of source rulesSourceRuleModel- Throws:
java.lang.IllegalStateException- if rule status isRuleStatus.ARCHIVED
-
checkRuleHasKieModule
public static <T extends AbstractRuleEngineRuleModel> void checkRuleHasKieModule(T rule)
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:
java.lang.IllegalStateException- if any given rule has no KIE module
-
-