org.kuali.rice.kew.rule
Class NamedRuleSelector

java.lang.Object
  extended by org.kuali.rice.kew.rule.NamedRuleSelector
All Implemented Interfaces:
RuleSelector
Direct Known Subclasses:
HierarchicalNamedRuleSelector

public class NamedRuleSelector
extends Object
implements RuleSelector

Rule selector that select a rule based on configured rule name

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
static String RULE_NAME_CFG_KEY
          The route node config param consulted to determine the rule name to select
 
Constructor Summary
NamedRuleSelector()
           
 
Method Summary
protected  String getName(RouteContext context, DocumentRouteHeaderValue routeHeader, RouteNodeInstance nodeInstance, String selectionCriterion, Timestamp effectiveDate)
           
 List<Rule> selectRules(RouteContext context, DocumentRouteHeaderValue routeHeader, RouteNodeInstance nodeInstance, String selectionCriterion, Timestamp effectiveDate)
          Returns a list of rules selected given the criteria specified in the arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RULE_NAME_CFG_KEY

public static final String RULE_NAME_CFG_KEY
The route node config param consulted to determine the rule name to select

See Also:
Constant Field Values
Constructor Detail

NamedRuleSelector

public NamedRuleSelector()
Method Detail

getName

protected String getName(RouteContext context,
                         DocumentRouteHeaderValue routeHeader,
                         RouteNodeInstance nodeInstance,
                         String selectionCriterion,
                         Timestamp effectiveDate)
                  throws WorkflowException
Returns:
the name of the rule that should be selected
Throws:
WorkflowException

selectRules

public List<Rule> selectRules(RouteContext context,
                              DocumentRouteHeaderValue routeHeader,
                              RouteNodeInstance nodeInstance,
                              String selectionCriterion,
                              Timestamp effectiveDate)
                       throws WorkflowException
Description copied from interface: RuleSelector
Returns a list of rules selected given the criteria specified in the arguments.

Specified by:
selectRules in interface RuleSelector
Parameters:
context - the RouteContext
routeHeader - the DocumentRouteHeaderValue of the current document
nodeInstance - the current RouteNodeInstance being executed
selectionCriterion - an implementation-specific criterion passed in from the calling context
effectiveDate - an optional criterion that indicates that the rules selected should be active on the given date
Returns:
a list of applicable rules, if any (null or empty list otherwise)
Throws:
WorkflowException - if anything goes awry...


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.