Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ParameterContract |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 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.core.api.parameter; | |
17 | ||
18 | import org.kuali.rice.core.api.mo.common.GloballyUnique; | |
19 | import org.kuali.rice.core.api.mo.common.Versioned; | |
20 | ||
21 | /** | |
22 | * This is the contract for a Parameter. The concept of a parameter is a key=value pair that is associated | |
23 | * with a rice enabled application. | |
24 | * | |
25 | * <p> | |
26 | * When thinking of a parameter in terms of a key=value pair, the following defines the key and value parts: | |
27 | * | |
28 | * the key of a parameter consists of the following pieces: | |
29 | * | |
30 | * <ol> | |
31 | * <li>{@link #getApplicationId() applicationId}</li> | |
32 | * <li>{@link #getNamespaceCode() namespaceCode}</li> | |
33 | * <li>{@link #getComponentCode() componentCode}</li> | |
34 | * <li>{@link #getName() name}</li> | |
35 | * </ol> | |
36 | * | |
37 | * the value consists of the {@link #getValue() value} | |
38 | * </p> | |
39 | */ | |
40 | public interface ParameterContract extends Versioned, GloballyUnique { | |
41 | ||
42 | /** | |
43 | * This is the application id for the Parameter. This cannot be null or a blank string. | |
44 | * | |
45 | * <p> | |
46 | * It is a way of assigning the Parameter to a specific rice application or rice ecosystem. | |
47 | * </p> | |
48 | * | |
49 | * @return application id | |
50 | */ | |
51 | String getApplicationId(); | |
52 | ||
53 | /** | |
54 | * This is the namespace for the parameter. This cannot be null or a blank string. | |
55 | * | |
56 | * <p> | |
57 | * It is a way of assigning the parameter to a logical grouping within a rice application or rice ecosystem. | |
58 | * </p> | |
59 | * | |
60 | * @return namespace code | |
61 | */ | |
62 | String getNamespaceCode(); | |
63 | ||
64 | /** | |
65 | * This is the component code for the parameter. This cannot be null. | |
66 | * | |
67 | * <p> | |
68 | * It is a way of assigning a parameter to a functional component within a rice application or rice ecosystem. | |
69 | * </p> | |
70 | * | |
71 | * @return component | |
72 | */ | |
73 | String getComponentCode(); | |
74 | ||
75 | /** | |
76 | * The name of the parameter. This cannot be null or a blank string. | |
77 | * @return name | |
78 | */ | |
79 | String getName(); | |
80 | ||
81 | /** | |
82 | * The value of the parameter. This can be null or a blank string. | |
83 | * @return value | |
84 | */ | |
85 | String getValue(); | |
86 | ||
87 | /** | |
88 | * This is the description for what the parameter is used for. This can be null or a blank string. | |
89 | * @return description | |
90 | */ | |
91 | String getDescription(); | |
92 | ||
93 | /** | |
94 | * This is the evaluation operator for the parameter. This can be null. | |
95 | * | |
96 | * <p> | |
97 | * This allows parameters to be used as primitive business rules. | |
98 | * </p> | |
99 | * | |
100 | * @return evaluation operator | |
101 | */ | |
102 | EvaluationOperator getEvaluationOperator(); | |
103 | ||
104 | /** | |
105 | * This is the type for the parameter. This cannot be null. | |
106 | * | |
107 | * <p> | |
108 | * Some parameters have special types in rice which may have special meaning | |
109 | * and is related to the {@link #getEvaluationOperator()} | |
110 | * </p> | |
111 | * | |
112 | * @return type | |
113 | */ | |
114 | ParameterTypeContract getParameterType(); | |
115 | ||
116 | } |