|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@ControlInterface public interface RulesExecutorControl
Nested Class Summary | |
---|---|
static interface |
RulesExecutorControl.RuleParams
Define the properties for this control. |
Method Summary | |
---|---|
Iterator |
evaluate(String rulesetUri,
String ruleName,
Object[] inputObjects)
Applies a named rule in the ruleset uri to the set of objects provided by the caller and returns an iterator over the resultant set of objects. |
Iterator |
evaluateAll(String rulesetUri,
Object[] inputObjects)
Applies all rules within the named rule set to the set of objects provided by the caller and returns an iterator over the resultant set of objects. |
Iterator |
evaluateRule(Object[] inputObjects)
Applies a named rule to the set of objects provided by the caller and returns an iterator over the resultant set of objects. |
Iterator |
evaluateRuleSet(Object[] inputObjects)
Applies all rules within the named rule set to the set of objects provided by the caller and returns an iterator over the resultant set of objects. |
void |
setDoFilter(boolean doFilter)
Toggle the filtering option, overriding the control property setting. |
void |
setFilterClass(String filterClass)
Set the Java Class on which the rules results will be filtered. |
void |
setFilterClasses(String[] filterClasses)
Set the array of Java Class names on which the rules results will be filtered. |
void |
setFilterRule(String ruleName)
Set the rule name for which the filter will be applied. |
Method Detail |
---|
Iterator evaluateRule(Object[] inputObjects) throws IllegalArgumentException, ApplicationException, P13nControlException
Use this method for a single invocation of the control, where all properties have been configured on the control.
inputObjects
- The set of objects to which the rule is to be applied
IllegalArgumentException
- if ruleSetUri
or ruleName
are null
or zero-length, or if inputObjects
is
null
.
ApplicationException
- if the rule set execution subsystem
is unable to execute the rule.
P13nControlException
- if remote exceptions are encountered.Iterator evaluateRuleSet(Object[] inputObjects) throws IllegalArgumentException, ApplicationException, P13nControlException
Applies all rules within the named rule set to the set of objects provided by the caller and returns an iterator over the resultant set of objects. The ruleset URI must be specified on the control properties.
Use this method for a single invocation of the control, where all properties have been configured on the control.
inputObjects
- The set of objects to which the rules are to be applied.
IllegalArgumentException
- if ruleSetUri
is null
or zero-length, or if inputObjects
is null
.
ApplicationException
- if the rule set execution subsystem
is unable to execute the rule set.
P13nControlException
- if remote errors are encountered.Iterator evaluate(String rulesetUri, String ruleName, Object[] inputObjects) throws IllegalArgumentException, ApplicationException, P13nControlException
Use this method for multiple invocations of the same control, where you'd like to execute different rulesets/rules each time.
rulesetUri
- Then URI of the ruleset containing the rule. This is relative to the
application's META-INF/data directory and begins with '/'ruleName
- The name of the rule within the ruleset to execute.inputObjects
- The set of objects to which the rule is to be applied
IllegalArgumentException
- if ruleSetUri
or ruleName
are null
or zero-length, or if inputObjects
is
null
.
ApplicationException
- if the rule set execution subsystem
is unable to execute the rule.
P13nControlException
- if remote exceptions are encountered.Iterator evaluateAll(String rulesetUri, Object[] inputObjects) throws IllegalArgumentException, ApplicationException, P13nControlException
Applies all rules within the named rule set to the set of objects provided by the caller and returns an iterator over the resultant set of objects.
Use this method for multiple invocations of the same control, where you'd like to execute different rulesets each time.
rulesetUri
- Then URI of the ruleset containing the rule. This is relative to the
application's META-INF/data directory and begins with '/'inputObjects
- The set of objects to which the rules are to be applied.
IllegalArgumentException
- if ruleSetUri
is null
or zero-length, or if inputObjects
is null
.
ApplicationException
- if the rule set execution subsystem
is unable to execute the rule set.
P13nControlException
- if remote errors are encountered.void setFilterClass(String filterClass) throws ClassNotFoundException
This method overrides the 'filterClass' property of this control and allows multiple invocations of the same control using different filters. It automatically sets the 'filterResults' parameter to true.
Specify either this or the filterClasses, but not both.
Use this method for multiple invocations of the same control using different filter classes. Otherwise, this property may be set on the control and applied to all invocations of the control
filterClass
- The Java Class name on which the results will be filtered.
ClassNotFoundException
- if the name class cannot be instantiatedvoid setFilterClasses(String[] filterClasses) throws ClassNotFoundException
This method overrides the 'filterClasses' property of this control and allows multiple invocations of the same control using different filters. It automatically sets the 'filterResults' parameter to true.
Specify either this or the filterClass, but not both.
Use this method for multiple invocations of the same control using different filter classes. Otherwise, this property may be set on the control and applied to all invocations of the control.
filterClasses
- The array of Java Class names on which the results will be filtered.
ClassNotFoundException
- if the name class cannot be instantiatedvoid setFilterRule(String ruleName)
Use this method for multiple invocations of the same control using different filter rules. Otherwise, this property may be set on the control and applied to all invocations of the control
This method overrides the 'filterRuleName' property of this control and allows multiple invocations of the same control using different filters. It automatically sets the 'filterResults' parameter to true.
ruleName
- The rule for which the filter will be applied.void setDoFilter(boolean doFilter)
When the rules engine has finished executing, its working memory will always include the input objects as well as any new objects created when the rule(s) fired. These new objects are of type 'com.bea.p13n.rules.Result' and you can use that API to get at the underlying object.
Use this method for multiple invocations of the same control using different filter rules. Otherwise, this property may be set on the control and applied to all invocations of the control
This method overrides the 'filterRuleName' property of this control and allows multiple invocations of the same control using different filters. It automatically sets the 'filterResults' parameter to true.
doFilter
- Whether or not to filter the rule results.
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |