1 /**
2 * Copyright 2005-2014 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.kew.api.rule;
17
18 import org.joda.time.DateTime;
19 import org.kuali.rice.core.api.mo.common.Identifiable;
20
21 import java.util.List;
22 import java.util.Map;
23
24 public interface RuleContract extends Identifiable {
25 /**
26 * Unique Name for the Rule.
27 *
28 * <p>
29 * This is the unique name of the Rule
30 *
31 * </p>
32 *
33 * @return name
34 */
35 String getName();
36
37 /**
38 * Unique id for the previous version of this Rule.
39 *
40 * <p>
41 * This is the unique id value of the previous version of this Rule.
42 * </p>
43 *
44 * @return previousVersionId
45 */
46 String getPreviousRuleId();
47
48 /**
49 * Unique Id for Template of Rule.
50 *
51 * <p>
52 * This is the unique Id of the rule template of the rule
53 * </p>
54 *
55 * @return ruleTemplateId
56 */
57 RuleTemplateContract getRuleTemplate();
58
59 /**
60 * The active indicator for the rule.
61 *
62 * @return true if active false if not.
63 */
64 boolean isActive();
65
66 /**
67 * The description of the rule.
68 *
69 * @return description
70 */
71 String getDescription();
72
73 /**
74 * The documentTypeName of the rule.
75 *
76 * @return documentTypeName
77 */
78 String getDocTypeName();
79
80 /**
81 * The ending date of the rule.
82 *
83 * <p>This is the date from which the rule stops being be used</p>
84 *
85 * @return fromDate
86 */
87 DateTime getFromDate();
88
89 /**
90 * The ending date of the rule.
91 *
92 * <p>This is the date from which the rule starts to be used</p>
93 *
94 * @return toDate
95 */
96 DateTime getToDate();
97
98 /**
99 * Shows if rule will force its action.
100 *
101 * @return boolean value representing if action is forced
102 */
103 boolean isForceAction();
104
105 /**
106 * List of rule responsibilities associated with the Rule
107 *
108 * @return ruleResponsibilities
109 */
110 List<? extends RuleResponsibilityContract> getRuleResponsibilities();
111
112 /**
113 * List of rule extensions associated with the Rule
114 *
115 * @return ruleExtensions
116 */
117 List<? extends RuleExtensionContract> getRuleExtensions();
118
119 /**
120 * rule Extensions are a key, value representation provided in a Map that extend a normal Rule
121 *
122 * @return ruleExtensionMap
123 */
124 //Map<String, String> getRuleExtensionMap();
125
126 /**
127 * Template Name of the Rule.
128 *
129 * <p>
130 * This is the name of the rule template for the rule
131 * </p>
132 *
133 * @return ruleTemplateName
134 */
135 String getRuleTemplateName();
136
137 /**
138 * Expression for rule to evaluate.
139 *
140 * <p>
141 * This is expression definition of the rule
142 * </p>
143 *
144 * @return ruleExpressionDef
145 */
146 RuleExpressionContract getRuleExpressionDef();
147 }