© 2004 BEA Systems, Inc.

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:


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.

© 2004 BEA Systems, Inc.

Copyright © 2004 BEA Systems, Inc. All Rights Reserved