|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CaseEdge
This interface represents a particular case (value) for a condition node. For example, consider a condition node that has a condition term of "mortgageValue". This condition node could have the following three case edges "< 100000", ">= 100000 and < 500000", and ">= 500000", representing the cases where the mortgage value falls within the specified range. Each case edge must always be interpreted within the context of its containing condition node. A case edge can be thought of as the lines connecting a parent tree node to it children in the decision tree.
A CaseEdge
itself cannot be changed. The value definition associated with
the case edge may be changed if it is based on a template. Use the
getValueDefinition
method on this class to get the
associated value definition. If the returned TreeConditionValueDefinition
contains a template instance, then the template instance can be changed by changing the
parameter values associated with it. The TreeConditionValueDefinition
can
also be changed to use a different template instance to define its value.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Method Summary | |
---|---|
java.util.List<TreeConditionValueTemplate> |
getAvailableValueTemplates()
Get the value templates available for use by this condition value. |
TreeNode |
getChildNode()
Get the child node of this case edge. |
ConditionNode |
getContainingConditionNode()
Get the condition node that contains this case edge. |
java.lang.String |
getUserPresentation()
Get the user presentation string for this case edge. |
TreeConditionValueDefinition |
getValueDefinition()
Get the value definition associated with this case edge. |
TemplateInstanceExpression |
getValueTemplateInstance()
Get the template instance defining the value for this case edge. |
void |
setValueTemplateInstance(TemplateInstanceExpression valueTemplateInstance)
Set the template instance defining the value for this case edge. |
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 |
---|
TreeNode getChildNode()
ConditionNode getContainingConditionNode()
TreeConditionValueDefinition getValueDefinition()
null
in the case where a
template is being used to define the value. In this case
getValueTemplateInstance()
will return a non-null
value.
null if a template is being used).
java.lang.String getUserPresentation()
This is a convenenience method that is equivalent to performing the following
sequence of method calls on this object:
getValueDefinition().getUserPresentation()
.
TemplateInstanceExpression getValueTemplateInstance()
getValueDefinition().getConditionValueTemplateInstance()
.
Of course, this will return null
if a template is not
being used for the value. In this case getValueDefinition()
will return a non-null
value.
void setValueTemplateInstance(TemplateInstanceExpression valueTemplateInstance) throws ValidationException, java.lang.IllegalArgumentException
getValueTemplateInstance
method to get the current template instance, get the ParameterValue
objects from the returned TemplateInstanceExpression
and change the value
for the desired parameters.
A new TemplateInstanceExpression
can be created by from one of the
value templates available to this case edge. The value templates for this case edge can
be obtained using the getAvailableValueTemplates
method on this object.
These two methods are equivalent.
If the value template instance for this object is currently null, then it is not
allowed to set the value template instance to a non-null value. In other words, the
API does not allow the case edge to be changed from a hard-coded value to one defined
by a template. If this is attempted, a ValidationException
is thrown.
Note: the implementation of this method creates a new
TreeConditionValueDefinition
object containing the specified template
instance. The new TreeConditionValueDefinition
object becomes the new
value definition for this case edge.
valueTemplateInstance
- The new template instance defining the value for this
case edge. The passed in TemplateInstanceExpression
is checked to ensure
that the template it is derived from is one of the templates available for this
case edge, i.e. that it is one of the templates returned by the
getAvailableValueTemplates
on this object. If it is not, then a
ValidationException
is thrown. If the current value of the value
template instance field is not null, then this parameter must be non-null.
Otherwise an IllegalArgumentException
is thrown.
ValidationException
- if either of the following is true:
TemplateInstanceExpression
is not null.
java.lang.IllegalArgumentException
- if the current value of the value template instance
field is not null and the passed in value is null.
ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published.java.util.List<TreeConditionValueTemplate> getAvailableValueTemplates()
TemplateInstanceExpressions
for this
condition value. This is a convenience method and is equivalent to performing the
following sequence of method calls on this object:
getContainingConditionNode().getTermDefinition().getConditionValueTemplates()
.
List
is unmodifiable.
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |