Package org.jeasy.rules.api
Class RulesEngineParameters
java.lang.Object
org.jeasy.rules.api.RulesEngineParameters
Parameters of a rules engine.
- When parameters are used with a
DefaultRulesEngine, they are applied on all registered rules. - When parameters are used with a
InferenceRulesEngine, they are applied on candidate rules in each iteration.
- Author:
- Mahmoud Ben Hassine ([email protected])
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault rule priority threshold. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a newRulesEngineParameterswith default values.RulesEngineParameters(boolean skipOnFirstAppliedRule, boolean skipOnFirstFailedRule, boolean skipOnFirstNonTriggeredRule, int priorityThreshold, boolean failsOnException) Create a newRulesEngineParameters. -
Method Summary
Modifier and TypeMethodDescriptionfailsOnException(boolean failsOnException) intstatic booleanhasOptionalParameterAnnotation(Class<?> methodAnnotation) booleanbooleanbooleanbooleanpriorityThreshold(int priorityThreshold) voidsetFailsOnException(boolean failsOnException) static voidsetOptionalParameterAnnotation(Class<?> optionalParameterAnnotation) voidsetPriorityThreshold(int priorityThreshold) voidsetSkipOnFirstAppliedRule(boolean skipOnFirstAppliedRule) voidsetSkipOnFirstFailedRule(boolean skipOnFirstFailedRule) voidsetSkipOnFirstNonTriggeredRule(boolean skipOnFirstNonTriggeredRule) skipOnFirstAppliedRule(boolean skipOnFirstAppliedRule) skipOnFirstFailedRule(boolean skipOnFirstFailedRule) skipOnFirstNonTriggeredRule(boolean skipOnFirstNonTriggeredRule) toString()
-
Field Details
-
DEFAULT_RULE_PRIORITY_THRESHOLD
public static final int DEFAULT_RULE_PRIORITY_THRESHOLDDefault rule priority threshold.- See Also:
-
-
Constructor Details
-
RulesEngineParameters
public RulesEngineParameters()Create a newRulesEngineParameterswith default values. -
RulesEngineParameters
public RulesEngineParameters(boolean skipOnFirstAppliedRule, boolean skipOnFirstFailedRule, boolean skipOnFirstNonTriggeredRule, int priorityThreshold, boolean failsOnException) Create a newRulesEngineParameters.- Parameters:
skipOnFirstAppliedRule- parameter to skip next applicable rules on first applied rule.skipOnFirstFailedRule- parameter to skip next applicable rules on first failed rule.skipOnFirstNonTriggeredRule- parameter to skip next applicable rules on first non triggered rule.priorityThreshold- threshold after which rules should be skipped.
-
-
Method Details
-
getPriorityThreshold
public int getPriorityThreshold() -
setPriorityThreshold
public void setPriorityThreshold(int priorityThreshold) -
priorityThreshold
-
isSkipOnFirstAppliedRule
public boolean isSkipOnFirstAppliedRule() -
setSkipOnFirstAppliedRule
public void setSkipOnFirstAppliedRule(boolean skipOnFirstAppliedRule) -
skipOnFirstAppliedRule
-
isSkipOnFirstNonTriggeredRule
public boolean isSkipOnFirstNonTriggeredRule() -
setSkipOnFirstNonTriggeredRule
public void setSkipOnFirstNonTriggeredRule(boolean skipOnFirstNonTriggeredRule) -
skipOnFirstNonTriggeredRule
-
isSkipOnFirstFailedRule
public boolean isSkipOnFirstFailedRule() -
setSkipOnFirstFailedRule
public void setSkipOnFirstFailedRule(boolean skipOnFirstFailedRule) -
isFailsOnException
public boolean isFailsOnException() -
setFailsOnException
public void setFailsOnException(boolean failsOnException) -
skipOnFirstFailedRule
-
failsOnException
-
hasOptionalParameterAnnotation
-
setOptionalParameterAnnotation
-
toString
-