View Javadoc

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.krms.api.repository.rule;
17  
18  import java.util.List;
19  import java.util.Map;
20  import java.util.Set;
21  
22  import org.kuali.rice.core.api.mo.common.Identifiable;
23  import org.kuali.rice.core.api.mo.common.Versioned;
24  import org.kuali.rice.core.api.mo.common.active.Inactivatable;
25  import org.kuali.rice.krms.api.repository.action.ActionDefinitionContract;
26  import org.kuali.rice.krms.api.repository.proposition.PropositionDefinitionContract;
27  
28  /**
29   * Defines the contract for a {@link RuleDefinition}
30   *
31   * @see RuleDefinition
32   * @see org.kuali.rice.krms.framework.engine.Rule
33   *
34   * @author Kuali Rice Team (rice.collab@kuali.org)
35   */
36  public interface RuleDefinitionContract extends Identifiable, Inactivatable, Versioned {
37      /**
38       * This is the name of the Rule 
39       * <p>
40       * name - the name of the Rule
41       * </p>
42       * @return the name of the Rule
43       */
44      public String getName();
45  
46      /**
47       * This is the description of the Rule 
48       * <p>
49       * description - the description of the Rule
50       * </p>
51       * @return the description of the Rule
52       */
53      public String getDescription();
54  
55  	/**
56  	 * This is the namespace of the Rule 
57  	 * <p>
58  	 * The namespace of the Rule
59  	 * </p>
60  	 * @return the namespace of the Rule
61  	 */
62  	public String getNamespace();
63  
64  	/**
65  	 * This is the KrmsType of the Rule
66  	 *
67  	 * @return id for KRMS type related of the Rule
68  	 */
69  	public String getTypeId();
70  	
71  	/**
72  	 * This method returns the ID of the Proposition associated with the rule.
73  	 * <p>
74  	 * Each Rule has exactly one Proposition associated with it.
75  	 * <p>
76  	 * @return the id of the Proposition associated with the Rule
77  	 */
78  	public String getPropId();
79  	
80  	/**
81  	 * This method returns the Proposition associated with the rule.
82  	 * <p>
83  	 * Each Rule has exactly one Proposition associated with it.
84  	 * <p>
85  	 * @return an immutable representation of the Proposition associated with the Rule
86  	 */
87  	public PropositionDefinitionContract getProposition();
88  	
89  	/**
90  	 * This method returns a list of Actions associated with the Rule.
91  	 * <p>
92  	 * A Rule may have zero or more Actions associated with it.
93  	 * <p>
94  	 * @return An ordered list of Actions associated with a Rule.
95  	 */
96  	public List<? extends ActionDefinitionContract> getActions();
97  
98  	/**
99  	 * This method returns a Map of attributes associated with the 
100 	 * Rule. The attributes are represented as name/value pairs.
101 	 * 
102 	 * @return a Map<String,String> of RuleAttribute objects.
103 	 */
104 	public Map<String, String> getAttributes();
105 	
106 }