1 /**
2 * Copyright 2005-2013 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.validation;
17
18 import org.kuali.rice.kew.api.rule.RuleContract;
19 import org.kuali.rice.kew.api.rule.RuleDelegationContract;
20
21 /**
22 * The RuleValidationContext represents the context under which to validate a Rule which is being entered
23 * into the system, be it through the web-based Rule GUI or via an XML import.
24 *
25 * The ruleAuthor is the UserSession of the individual who is entering or editing the rule. This may
26 * be <code>null</code> if the rule is being run through validation from the context of an XML rule
27 * import.
28 *
29 * The RuleDelegation represents the pointer to the rule from it's parent rule's RuleResponsibility.
30 * This will be <code>null</code> if the rule being entered is not a delegation rule.
31 *
32 * @author Kuali Rice Team (rice.collab@kuali.org)
33 */
34 public interface RuleValidationContextContract {
35 /**
36 * Retrieve the rule which is being validated.
37 */
38 public RuleContract getRule();
39
40 /**
41 * Retrieve the principal of the rule author. May be null in the
42 * case of an XML rule import.
43 */
44 public String getRuleAuthorPrincipalId();
45
46 /**
47 * Retrieve the RuleDelegation representing the parent of the rule being validated. If the rule is
48 * not a delegation rule, then this will return null;
49 */
50 public RuleDelegationContract getRuleDelegation();
51 }