001/** 002 * Copyright 2005-2015 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.kew.rule; 017 018import java.sql.Timestamp; 019import java.util.List; 020 021import org.kuali.rice.kew.engine.RouteContext; 022import org.kuali.rice.kew.engine.node.RouteNodeInstance; 023import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue; 024 025 026/** 027 * RuleSelector is responsible for selecting the rules to be evaluated for a given rule-based requests node. 028 * @author Kuali Rice Team (rice.collab@kuali.org) 029 */ 030public interface RuleSelector { 031 /** 032 * Returns a list of rules selected given the criteria specified in the arguments. 033 * 034 * @param context the RouteContext 035 * @param routeHeader the DocumentRouteHeaderValue of the current document 036 * @param nodeInstance the current RouteNodeInstance being executed 037 * @param selectionCriterion an implementation-specific criterion passed in from the calling context 038 * @param effectiveDate an optional criterion that indicates that the rules selected should be active on the given date 039 * @return a list of applicable rules, if any (null or empty list otherwise) 040 * @throws org.kuali.rice.kew.api.exception.WorkflowException if anything goes awry... 041 */ 042 /* inputs taken from FlexRM getActionRequests/makeActionRequests */ 043 public List<Rule> selectRules(RouteContext context, DocumentRouteHeaderValue routeHeader, RouteNodeInstance nodeInstance, String selectionCriterion, Timestamp effectiveDate); 044}