Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.controls.rules
Interface RulesExecutorControl

All Superinterfaces:
  weblogic.jws.control.Control, com.bea.control.Control, Serializable

public interface RulesExecutorControl
extends weblogic.jws.control.Control

This control defines the API for executing named rule sets and/or rules using the underlying BEA rules engine. The ruleset, rule, and filters are all set as attributes on the control and may be edited in the control property set GUI. It is assumed the user knows which rules exist in the rules repository. Use the RulesManagerControl to list, access, or manage these rules. Rulesets are stored in the Portal data repository and are updated using data sync. They are loaded automatically when the server starts. To facilitate loading rulesets via data sync, simply place the ruleset file (generally ends with .rls) into the application's META-INF/data directory. For better organization, you may place the rulesets into a subdirectory, such as META-INF/data/rulesets. The ruleset uri is relative to the META-INF/data directory.
Control properties:

- rulesetUri (REQUIRED) URI of the ruleset to use. This is relative to the application's META-INF/data directory. Use the RulesMangerControl to list rulesets and rules.
- ruleName (OPTIONAL) Name of the rule to use. Must be contained within the ruleset URI specified for this control.
- filterResults (OPTIONAL) Whether to filter the results after the rule(s) have been evaluated. If false, all objects remaining in working memory will be returned.
- filterClassName (OPTIONAL) Filter rule results on this class. Enter class name (eg, java.lang.String). If left empty, results will not be filtered. Specify either this or the 'filterClassNames' but not both.
- filterClassNames (OPTIONAL) Filter rule results on these classes. Enter as a comma-separated list of class names. If left empty, results will not be filtered. Specify either this or the 'filterClassName' but not both.
- filterRuleName (OPTIONAL) Filter rule results on the rule that produced the result. If this is left empty, then results from all rules will be returned. Otherwise, results from only this rule will be returned. This filter is applied in conjunction with the Class filters, if those are specified.

Security requirements: none

Nested Class Summary

Nested classes inherited from class com.bea.control.Control
`com.bea.control.Control.Callback`

Method Summary
`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.

Method Detail

### evaluateRule

    public Iterator evaluateRule(Object[] inputObjects)
                          throws IllegalArgumentException,
                                 ApplicationException,
                                 P13nControlException

  Applies a named rule to the set of objects provided by the caller and returns an iterator over the resultant set of objects.

  The ruleset URI and rule name must be specified on the control properties. Optionally, the results may be filtered according to a particular class, group of classes, or rule. Those filtering parameters are set on the control properties. If they are not set, the results are returned as-is, without filtering.

  For more information on filtering results, see the javadocs for com.bea.p13n.rules.manager.RuleResultClassFilter

  Parameters:
    `inputObjects` - The set of objects to which the rule is to be applied
  Returns:
    The set of objects which resulted from the application of the rule and optionally filtered.
  Throws:
    `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.

### evaluateRuleSet

    public 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. Optionally, the results may be filtered according to a particular class, group of classes, or rule. Those filtering parameters are set on the control properties. If they are not set, the results are returned as-is, without filtering.

  For more information on filtering results, see the javadocs for com.bea.p13n.rules.manager.RuleResultClassFilter

  Parameters:
    `inputObjects` - The set of objects to which the rules are to be applied.
  Returns:
    The set of objects which resulted from the application of the rules and optionally filtered
  Throws:
    `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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved