wt.rule
Interface RuleSelector

All Known Implementing Classes:
DefaultRuleSelector, TypeBasedCompositeRuleSelector

public interface RuleSelector

This interface defines a rule selector. A rule selector selects an appropriate rule based the selection criteria that is provided. Different implementations of this will use the selection criteria in different ways to select a rule.

Supported API: false

Extendable: false


Method Summary
 Rule getRule(Object object, RuleType ruleType, WTContainerRef container)
          Select a rule of type ruleType that is applicable to object.
 

Method Detail

getRule

public Rule getRule(Object object,
                    RuleType ruleType,
                    WTContainerRef container)
             throws WTException
Select a rule of type ruleType that is applicable to object. If no rule can be found, return null.

The object argument may be a type identifier or a normal object. A type identifier is one of the following:

Different implementations of this interface will use the criteria in different ways to select a rule.

Parameters:
object - the object that the rule should be applicable to (cannot be null)
ruleType - the type of rule to select (cannot be null)
container - the container in which to search for the rule
Returns:
Rule
Throws:
WTException