|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConditionNode
This interface represents on condition in a decision tree. A condition node has a reference to a condition term definition that defines the term ("left-hand side") for this condition. It also contains a list of case edges which represent the cases to be checked for for the specified term. Each case edge defines a particular condition, such as "== 100" or ">=1000 and < 10000", that is checked for this term. Each case edge refers to a child node which is the either the next condition node in the tree or is an action node that defines the action to take. The case edge whose condition evaluates to true is followed to get to the next node in the tree.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Method Summary | |
---|---|
void |
addConditionValueToThisLevel(TemplateInstanceExpression newConditionValue)
Add a new condition value to all the condition nodes at the same level as this one in the decision tree. |
java.util.List<TreeConditionValueTemplate> |
getAvailableValueTemplates()
Get the value templates available for use by this condition node. |
java.util.List<CaseEdge> |
getCaseEdges()
Get the list of case edges for this condition node. |
TreeNode |
getOtherwiseCase()
This is a 'condition' that is satisfied if no other condition is satisfied. |
TreeConditionTermDefinition |
getTermDefinition()
Get the term definition for this condition. |
boolean |
removeConditionValue(TemplateInstanceExpression conditionValueToRemove)
Remove the specified condition value from this condition node. |
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.dtable.TreeNode |
---|
getContainingTreeBlock, getParentNode, getRootNode, isOtherwiseCase |
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleValidateable |
---|
validate |
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleChangeDetector |
---|
hasChanges |
Field Detail |
---|
static final java.lang.String COPYRIGHT
Method Detail |
---|
java.util.List<CaseEdge> getCaseEdges()
List
is unmodifiable.boolean removeConditionValue(TemplateInstanceExpression conditionValueToRemove)
The condition value is specified by passing in the template instance expression obtained from one of the case edges in this condition node. Only condition values defined by template instance expressions can be removed using this method.
conditionValueToRemove
- The template instance expression from the case edge to be
removed. Must not be null.
true
if and only if
conditionValueToRemove was found and removed.
void addConditionValueToThisLevel(TemplateInstanceExpression newConditionValue) throws ValidationException, java.lang.IllegalArgumentException
This method adds a new case edge to this condition node and all other condition nodes
at the same level in the tree. Each new case edge represents the same value, the value
specified by the passed in TemplateInstanceExpression
. Each case edge
needs a new subtree underneath it. The subtree will be a clone of one of the existing
subtrees under one of the existing case edges for the condition node that the case edge
is being added to. This effectively adds a new subtree under each of the condition
nodes at this level that is a clone of the existing subtrees. Each new subtree is
reachable via the new case edges added to the existing condition nodes. Condition nodes
within these new subtrees are copies of the condition nodes in the existing subtrees.
Each new subtree also results in a new set of action nodes as the leaf nodes of the subtree. These leaf nodes need to have values set to define what the action is. Each tree action in these new action nodes starts with no value defined. The client should navigate down to each of the new action nodes and add template instance expressions to each of the tree actions to define the action.
newConditionValue
- The new condition value to be added to all condition nodes
at this level in the tree. This TemplateInstanceExpression
cannot be null
and must be derived from a value template that is available to this condition node.
ValidationException
- if the passed in TemplateInstanceExpression
is
not derived from a template that is available to this condition node.
java.lang.IllegalArgumentException
- if the passed in TemplateInstanceExpression
is null.
ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published.TreeConditionTermDefinition getTermDefinition()
java.util.List<TreeConditionValueTemplate> getAvailableValueTemplates()
TemplateInstanceExpressions
for this
condition node. This is a convenience method and is equivalent to performing the
following sequence of method calls on this object:
getTermDefinition().getConditionValueTemplates()
.
List
is unmodifiable.TreeNode getOtherwiseCase()
CaseEdge
, it is a condition that is satisfied if no other
condition is satisfied.
TreeNode
that is traversed if no other
ConditionNode
is satisfied.
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |