com.ibm.wbiserver.brules.mgmt.ruleset
Interface RuleSetRuleTemplate
- All Superinterfaces:
- RuleTemplate, java.io.Serializable, Template
public interface RuleSetRuleTemplate
- extends RuleTemplate, java.io.Serializable
This interface represents a rule template contained within a ruleset. There is another
interface,
DecisionTableRuleTemplate
,
that represents a rule template contained within a decision table.
The RuleSetRuleTemplate
interface allows you to create new instances of the
template. To do this, you first need to create ParameterValue
objects to
represent the values for all the parameters on this template. Use the
getParameters
method on this template to get the defined parameters, then use the
createParameterValue
method on the individual Parameter
objects to create ParameterValue
objects with the desired values. Once the list of ParameterValue
objects
is created, create a template instance using the
createRuleFromTemplate
method on this
interface.
Field Summary |
static java.lang.String |
COPYRIGHT
|
COPYRIGHT
static final java.lang.String COPYRIGHT
- See Also:
- Constant Field Values
createRuleFromTemplate
RuleSetTemplateInstanceRule createRuleFromTemplate(java.lang.String ruleName,
java.util.List<ParameterValue> parameterValues)
throws ValidationException
- Create a new rule based on this rule template with the specified name and
the specified values for the template parameters. The following
validation is performed:
- the
ruleName
is checked to ensure that it is unique
within the rule block containing this template
- the parameter values are checked to ensure that all parameters for
this template have a value and that all of the parameters in the
parameter value list correspond to parameters defined on this template.
- Parameters:
ruleName
- The name for the new rule. Must not be null
.parameterValues
- The template parameter values for the new rule. New
ParameterValue
objects can be created using the
createParameterValue
method on the Parameter
class. Must not be
null
or empty. Also, the elements within the
list must not be null
. The order of the
parameter values in the list does not need to match the order
of the parameters in the rule template. However, if the order
is different, the parameter values will be reordered when they
are stored to match the order of the parameters in the rule
template.
- Returns:
- The new rule.
- Throws:
ValidationException
- if any validation errors are detected as defined above.
java.lang.IllegalArgumentException
- if ruleName
is null
or if
parameterValues
is null
or if
parameterValues
is empty.
ChangesNotAllowedException
- if changes related to this object are temporarily disallowed
while other changes are being published.
java.lang.IllegalArgumentException
- if ruleName
is null
, if
parameterValues
is null
, or if
parameterValues
contains any null
elements.
getParentRuleSet
RuleSet getParentRuleSet()
- Get the ruleset that contains this rule template.
- Returns:
- The
RuleSet
that contains this RuleTemplate
.