|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krms.framework.engine.BasicRule
public class BasicRule
A Rule that executes a Action when the Proposition is true.
| Constructor Summary | |
|---|---|
BasicRule(Proposition proposition,
List<Action> actions)
Constructor |
|
BasicRule(String name,
Proposition proposition,
List<Action> actions)
Constructor |
|
| Method Summary | |
|---|---|
boolean |
evaluate(ExecutionEnvironment environment)
Evaluate a given ExecutionEnvironment, returning true if the rules conditions pass, false if they do not. |
String |
getName()
Return the Rule name |
protected boolean |
shouldExecuteAction(boolean ruleExecutionResult)
Based on the ruleExecutionResult should the Action be executed? Default behavior is to return the given ruleExecutionResult. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicRule(String name,
Proposition proposition,
List<Action> actions)
name - Rule name to set the name toproposition - Proposition to set the proposition to, cannot be nullactions - Rule Actions to set the actions to
IllegalArgumentException - if the Proposition is null
public BasicRule(Proposition proposition,
List<Action> actions)
proposition - Proposition to set the proposition to, cannot be nullactions - Rule Actions to set the actions to
IllegalArgumentException - if the Proposition is null| Method Detail |
|---|
public boolean evaluate(ExecutionEnvironment environment)
RuleExecutionEnvironment, returning true if the rules conditions pass, false if they do not.
evaluate in interface Ruleenvironment - ExecutionEnvironment
ExecutionEnvironment the rule's conditions pass, false if they do notprotected boolean shouldExecuteAction(boolean ruleExecutionResult)
Action be executed? Default behavior is to return the given ruleExecutionResult.
Over-writable by subclasses.
ruleExecutionResult - the result of the engines evaluation method.
public String getName()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||