|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.rules.AbleRule
com.ibm.able.rules.AbleIfThenElseRule
This class holds the expressions and actions used in an if-then-else scripting rule. The antecedent expression can be an arbitrarily complex boolean expression and the then{} and else{} sections can contain one or more consequent (action) clauses.
| Field Summary | |
|---|---|
protected AbleExpression |
myAntecedent
myAntecedent is an AbleExpression that evaluates to a boolean value. |
protected java.util.Vector |
myElseList
myElseList is a list of AbleConsequentClause objects. |
protected java.util.Vector |
myThenList
myThenList is a list of AbleConsequentClause objects. |
| Fields inherited from class com.ibm.able.rules.AbleRule |
|---|
myBooleanTruth, myBreakpoint, myComment, myEnabled, myFinalFlag, myFiredCount, myFiredFlag, myId, myLabel, myLocation, myPreConditions, myPriority, myPrompt, myProperties, myRdRefs, myRuleBlock, myRuleSet, myTemplateFlag, myTemplateName, myTemplateValues, myWrRefs, PriorityDefault, RuleIdInitial |
| Constructor Summary | |
|---|---|
AbleIfThenElseRule(java.lang.String theLabel,
AbleRd thePriority,
AbleExpression theAntecedent,
java.util.Vector theThenList,
java.util.Vector theElseList)
Create a new conditional rule with the specified priority, antecedent clauses, and consequent clause. |
|
| Method Summary | |
|---|---|
void |
addElseAction(AbleConsequentClause theAction)
|
void |
addThenAction(AbleConsequentClause theAction)
|
java.lang.String |
arlString()
Return a formal Able Rule Language (ARL) String. |
java.lang.String |
armlString()
Return a formal XML string. |
AbleExpression |
getAntecedent()
Retrieve the rule's list of antecedent clauses. |
java.util.Vector |
getElseClauses()
Retrieve the rule's list of else clauses. |
java.lang.String |
getTemplateString(java.util.Vector theTemplateVars)
Retrieve a text format string for use by rule templates. |
java.util.Vector |
getThenClauses()
Retrieve the rule's list of consequent clauses. |
long |
numberOfAntecedents()
Retrieve the number of antecedent clauses in this rule. |
long |
numberOfElseClauses()
Retrieve the number of else clauses in this rule. |
long |
numberOfThenClauses()
Retrieve the number of consequent clauses in this rule. |
void |
reset()
Reset the rule to its unfired state. |
void |
setThenActions(java.util.Vector theThenActions)
|
java.lang.String |
toString()
Retrieve a string describing (the contents of) the object. |
java.lang.String |
traceString(int theTraceStringFlavor)
Retrieve a string describing (the contents of) the object. |
java.lang.String |
xmlString()
Return a formal XML string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected AbleExpression myAntecedent
protected java.util.Vector myThenList
protected java.util.Vector myElseList
| Constructor Detail |
public AbleIfThenElseRule(java.lang.String theLabel,
AbleRd thePriority,
AbleExpression theAntecedent,
java.util.Vector theThenList,
java.util.Vector theElseList)
theLabel - The unique label, or name, of this rule.
thePriority - The priority of this rule.
theAntecedent - An AbleExpression that defines the
antecedent for this rule.
theThenList - A list of assignment statements that define the
consequents of this rule. The list must contain
at least one AbleConsequentClause.
The list is cloned.
theElseList - A list of assignment statements that define the
actions to perform when the antecedents fail.
The list may be empty, but it must not be null.
The list is cloned.
| Method Detail |
public void addThenAction(AbleConsequentClause theAction)
public void setThenActions(java.util.Vector theThenActions)
public void addElseAction(AbleConsequentClause theAction)
public final AbleExpression getAntecedent()
public long numberOfAntecedents()
public final java.util.Vector getThenClauses()
public long numberOfThenClauses()
public final java.util.Vector getElseClauses()
public long numberOfElseClauses()
public void reset()
reset in class AbleRulepublic java.lang.String arlString()
arlString in class AbleRulepublic java.lang.String xmlString()
xmlString in class AbleRulepublic java.lang.String armlString()
armlString in class AbleRule
public java.lang.String getTemplateString(java.util.Vector theTemplateVars)
throws AbleDataException
getTemplateString in class AbleRuletheTemplateVars - An ordered list of template variables referenced by this rule.
AbleDataExceptionAbleRuleTemplatepublic java.lang.String toString()
toString in class AbleRulepublic java.lang.String traceString(int theTraceStringFlavor)
traceString in class AbleRuletheTraceStringFlavor - An Able.TraceStringFlavor value.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||