com.ibm.wbiserver.brules.mgmt.dtable
Interface TreeAction
- public interface TreeAction
- extends BusinessRuleValidateable, BusinessRuleChangeDetector, java.io.Serializable
TreeAction
contains the following:
- The definition of the term for this action. This defines the variable that a value will be assigned to by this action.
- The user presentation string for the value for this action. This defines how the value should be presented to the end user. This may be null if there is no user presentation or if the value is defined by a template, i.e. there is a value template instance. In this case the user presentation is defined by the template used to define the value.
- A template instance that defines the value for this action. This may be null if the value is not defined by a template.
- An indication of whether or not the value is "not applicable". A "not applicable" value means that the action is an invocation of another SCA component.
The value for each tree action is either a hard-coded expression or is defined by a template instance. The hard-coded expression cannot be obtained using the API. If the value is a hard-coded expression, then the value user presentation string should be used to determine how to present the value to the user. If the value is defined by a template instance, then the associated template, along with the parameter values from the template instance, should be used to determine how to present the value to the user.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getAvailableValueTemplates()
Get the value templates available for use by this action.
|
getTermDefinition()
Get the definition of the term of this tree action.
|
|
getValueTemplateInstance()
Get the template instance defining the value for this action.
|
|
|
getValueUserPresentation()
Get the user presentation string for the value for this tree action.
|
|
isValueNotApplicable()
Determine whether or not the value is "not applicable".
|
|
setValueTemplateInstance(TemplateInstanceExpression valueTemplateInstance)
Set the template instance defining the value for this action.
|
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleValidateable |
---|
validate |
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleChangeDetector |
---|
hasChanges |
Field Detail
COPYRIGHT
- static final java.lang.String COPYRIGHT
Method Detail
getTermDefinition
- TreeActionTermDefinition getTermDefinition( )
isValueNotApplicable
- boolean isValueNotApplicable()
getValueTemplateInstance
- TemplateInstanceExpression getValueTemplateInstance( )
setValueTemplateInstance
- 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 defined for this action. The value templates for this action can be
obtained using the getAvailableValueTemplates
method on this object. They
can also be obtained by using the getTermDefinition
method on this object
to get the TreeActionTermDefinition
for this action and then using the
getValueTemplates
to get the value templates. 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 action to be changed from a hard-coded action to one defined
by a template. If this is attempted, a ValidationException
is thrown.
valueTemplateInstance
- The new template instance defining the value for this
action. The passed in TemplateInstanceExpression
is checked to ensure
that the template it is derived from is one of the templates available for this
action, 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:
- The template instance is not derived from a template
that is available to this action.
- The current value template instance is null and the passed in
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. getAvailableValueTemplates
- java.util.List<TreeActionValueTemplate> getAvailableValueTemplates( )
TemplateInstanceExpressions
for this action.
This is a convenience method and is equivalent to performing the following sequence of
method calls on this object: getTermDefinition().getValueTemplates()
.
List
is unmodifiable. getValueUserPresentation
- java.lang.String getValueUserPresentation( )