public class RuleEngine extends Object
| Constructor and Description |
|---|
RuleEngine(TextualRuleEngine textualRuleEngine) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearRules()
The clearRules method remove all rules from RuleBinding Engine.
|
Map<String,Boolean> |
fireRules()
The fireRules trigger all registered rules.
|
List<RuleResult> |
getResults()
The getResults returns RuleBinding Engine Detail Result.
|
Object |
getRule(String ruleId)
The getRule method returns rule from RuleBinding Engine.
|
List<Object> |
getRules()
The getRules method returns all rules from RuleBinding Engine.
|
String |
registerRule(Object rule)
The registerRule method is used to register rules in a RuleBinding Engine.
|
void |
setSatisfyCondition(Integer satisfyCondition) |
void |
setStopOnFail(Boolean stopOnFail) |
void |
unregisterRule(String ruleId)
The unregisterRule method is used to unregister rule from RuleBinding Engine.
|
public RuleEngine(TextualRuleEngine textualRuleEngine)
public String registerRule(Object rule) throws IllegalRuleException
rule - This param is any class which is annotated with @RuleBinding
annotation and contains at least one method
with @Condition annotation.IllegalRuleException - This method throws IllegalRuleException
when the passed object is null or
not annotated with @RuleBinding annotation or RuleBinding without Condition Method and Text Condition without TextualRuleEngine Param.public void unregisterRule(String ruleId)
ruleId - The ruleId is unique id returns while rule registeringpublic Object getRule(String ruleId)
ruleId - The ruleId is unique id returns while rule registeringpublic List<Object> getRules()
public void clearRules()
public Map<String,Boolean> fireRules()
public List<RuleResult> getResults()
RuleResultpublic void setSatisfyCondition(Integer satisfyCondition)
public void setStopOnFail(Boolean stopOnFail)
Copyright © 2016. All rights reserved.