001 /**
002 * Copyright 2005-2012 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 */
016 package org.kuali.rice.kew.api.rule;
017
018 import org.joda.time.DateTime;
019 import org.kuali.rice.core.api.mo.common.Identifiable;
020
021 import java.util.List;
022 import java.util.Map;
023
024 public interface RuleContract extends Identifiable {
025 /**
026 * Unique Name for the Rule.
027 *
028 * <p>
029 * This is the unique name of the Rule
030 *
031 * </p>
032 *
033 * @return name
034 */
035 String getName();
036
037 /**
038 * Unique id for the previous version of this Rule.
039 *
040 * <p>
041 * This is the unique id value of the previous version of this Rule.
042 * </p>
043 *
044 * @return previousVersionId
045 */
046 String getPreviousRuleId();
047
048 /**
049 * Unique Id for Template of Rule.
050 *
051 * <p>
052 * This is the unique Id of the rule template of the rule
053 * </p>
054 *
055 * @return ruleTemplateId
056 */
057 RuleTemplateContract getRuleTemplate();
058
059 /**
060 * The active indicator for the rule.
061 *
062 * @return true if active false if not.
063 */
064 boolean isActive();
065
066 /**
067 * The description of the rule.
068 *
069 * @return description
070 */
071 String getDescription();
072
073 /**
074 * The documentTypeName of the rule.
075 *
076 * @return documentTypeName
077 */
078 String getDocTypeName();
079
080 /**
081 * The ending date of the rule.
082 *
083 * <p>This is the date from which the rule stops being be used</p>
084 *
085 * @return fromDate
086 */
087 DateTime getFromDate();
088
089 /**
090 * The ending date of the rule.
091 *
092 * <p>This is the date from which the rule starts to be used</p>
093 *
094 * @return toDate
095 */
096 DateTime getToDate();
097
098 /**
099 * 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 }