1 /**
2 * Copyright 2005-2015 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.krms.framework.engine;
17
18 import java.util.List;
19
20 import org.kuali.rice.krms.api.engine.ExecutionEnvironment;
21 import org.kuali.rice.krms.api.engine.TermResolver;
22
23 /**
24 * The context represents the area(s) of an organization's activity where a
25 * rule applies and where the terms used to create the rule are defined and relevant.
26 * An equivalent phrase often used is business domain. Rules only make sense in a
27 * particular context and because they must be evaluated against the information in
28 * that domain or context.
29 *
30 * <p>For example, rules that are specifically authored and
31 * that are meaningful in an application on a Research Proposal would be most
32 * unlikely to make sense or be relevant in the context of a Student Record even
33 * if the condition could be evaluated.
34 *
35 * @author Kuali Rice Team (rice.collab@kuali.org)
36 *
37 */
38 public interface Context {
39
40 /**
41 * Execute with the given {@link ExecutionEnvironment}
42 * @param environment {@link ExecutionEnvironment} to execute with
43 */
44 void execute(ExecutionEnvironment environment);
45
46 /**
47 * Return a list of the {@link TermResolver}s
48 * @return List<TermResolver<?>>
49 */
50 List<TermResolver<?>> getTermResolvers();
51
52 }