Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AttributeDefinitionInfc |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 1.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/ecl1.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.student.datadictionary.infc; | |
17 | ||
18 | import org.kuali.rice.kns.datadictionary.validation.DataType; | |
19 | ||
20 | /** | |
21 | * Dictionary data for Attributes (or fields) that exist on an object. | |
22 | * | |
23 | * @author nwright | |
24 | */ | |
25 | public interface AttributeDefinitionInfc { | |
26 | ||
27 | /** | |
28 | * Name: Name | |
29 | * | |
30 | * The name of the attribute (or field). | |
31 | * | |
32 | * Should match the field name on the corresponding business object. | |
33 | * | |
34 | * TODO: figure out how to handle sub-objects. I.e. using dot notation? | |
35 | * | |
36 | * name = name of attribute | |
37 | */ | |
38 | public String getName(); | |
39 | ||
40 | /** | |
41 | * Name: child entry name | |
42 | * | |
43 | * deprecated | |
44 | */ | |
45 | public String getChildEntryName(); | |
46 | ||
47 | /** | |
48 | * Name: Data Type | |
49 | * | |
50 | * The type of data this attribite (field) holds. | |
51 | * I.e. STRING, INTEGER, DATE, LONG, DATETIME, COMPLEX, etc. | |
52 | */ | |
53 | public DataType getDataType(); | |
54 | ||
55 | /** | |
56 | * Name: Required | |
57 | * | |
58 | * The required element allows values of "true" or "false". A value of | |
59 | * "true" indicates that a value must be entered for this business object | |
60 | * when creating or editing a new business object. | |
61 | */ | |
62 | public Boolean isRequired(); | |
63 | ||
64 | /** | |
65 | * Name: Minimum Occurences | |
66 | * | |
67 | * The minimum number of allowed occurences | |
68 | * | |
69 | * TODO: get Rice to rename this to getMinOccurs to it matches the setter. | |
70 | */ | |
71 | public Integer getMinOccurs(); | |
72 | ||
73 | /** | |
74 | * Name: Maximum Occurrences | |
75 | * | |
76 | * The maximum number of allowed occurences of this field | |
77 | * | |
78 | * TODO: Get RICE to rename this getMaxOccurs so it matches the setter | |
79 | * TODO: Get RICE to set a value that means UNBOUNDED, perhaps 999999999 | |
80 | */ | |
81 | public Integer getMaxOccurs(); | |
82 | ||
83 | /** | |
84 | * Name: Minimum Length | |
85 | * | |
86 | * The miniumum length allowed for the field | |
87 | */ | |
88 | public Integer getMinLength(); | |
89 | ||
90 | /** | |
91 | * Name: Maximum Length | |
92 | * | |
93 | * The maxLength element determines the maximum size of the field for data | |
94 | * entry edit purposes and for display purposes. | |
95 | */ | |
96 | public Integer getMaxLength(); | |
97 | ||
98 | /** | |
99 | * Name: Force Uppercase | |
100 | * | |
101 | * forceUppercase = convert user entry to uppercase and always display | |
102 | * database value as uppercase. | |
103 | */ | |
104 | public Boolean getForceUppercase(); | |
105 | ||
106 | /** | |
107 | * Name: Short Label | |
108 | * | |
109 | * The shortLabel element is the field or collection name that will be used | |
110 | * in applications when a shorter name (than the label element) is required. | |
111 | * This will be overridden by presence of displayLabelAttribute element. | |
112 | */ | |
113 | public String getShortLabel(); | |
114 | ||
115 | /** | |
116 | * Name: Summary | |
117 | * | |
118 | * The summary element is used to provide a short description of the | |
119 | * attribute or collection. This is designed to be used for help purposes. | |
120 | */ | |
121 | public String getSummary(); | |
122 | ||
123 | /** | |
124 | * Name: Label | |
125 | * | |
126 | * The label element is the field or collection name that will be shown on | |
127 | * inquiry and maintenance screens. This will be overridden by presence of | |
128 | * displayLabelAttribute element. | |
129 | */ | |
130 | public String getLabel(); | |
131 | ||
132 | /** | |
133 | * Name: Description | |
134 | * | |
135 | * The description element is used to provide a long description of the | |
136 | * attribute or collection. This is designed to be used for help purposes. | |
137 | */ | |
138 | public String getDescription(); | |
139 | ||
140 | /** | |
141 | * Name: Exclusive Minimum | |
142 | * | |
143 | * The exclusiveMin element determines the minimum allowable value for data | |
144 | * entry editing purposes. Value can be an integer or decimal value such as | |
145 | * -.001 or 99. | |
146 | */ | |
147 | public String getExclusiveMin(); | |
148 | ||
149 | /** | |
150 | * Name: Exclusive Maximum | |
151 | * | |
152 | * The inclusiveMax element determines the maximum allowable value for data | |
153 | * entry editing purposes. Value can be an integer or decimal value such as | |
154 | * -.001 or 99. | |
155 | * | |
156 | * JSTL: This field is mapped into the field named "exclusiveMax". | |
157 | */ | |
158 | public String getInclusiveMax(); | |
159 | ||
160 | /** | |
161 | * Name: Display Label Attribute | |
162 | * | |
163 | * The displayLabelAttribute element is used to indicate that the label and | |
164 | * short label should be obtained from another attribute. | |
165 | * | |
166 | * The label element and short label element defined for this attribute will | |
167 | * be overridden. Instead, the label and short label values will be obtained | |
168 | * by referencing the corresponding values from the attribute indicated by | |
169 | * this element. | |
170 | */ | |
171 | public String getDisplayLabelAttribute(); | |
172 | ||
173 | /** | |
174 | * Name: Unique | |
175 | * | |
176 | * Similar to a db column that is flagged as unique, the value is unique | |
177 | * across all data objects of that type | |
178 | * | |
179 | * TODO: ask if this should be isUnique instead of getUnique? | |
180 | */ | |
181 | public Boolean isUnique(); | |
182 | ||
183 | /** | |
184 | * Name: Custom Validator Class | |
185 | * | |
186 | * Class to do custom validation | |
187 | */ | |
188 | public String getCustomValidatorClass(); | |
189 | ||
190 | /** | |
191 | * Name: Formatter Class | |
192 | * | |
193 | * The formatterClass element is used when custom formatting is required for | |
194 | * display of the field value. This field specifies the name of the java | |
195 | * class to be used for the formatting. About 15 different classes are | |
196 | * available including BooleanFormatter, CurrencyFormatter, DateFormatter, | |
197 | * etc. | |
198 | */ | |
199 | public String getFormatterClass(); | |
200 | ||
201 | /** | |
202 | * Name: Valid Characters Constraint | |
203 | * | |
204 | * The constraint that applies regular expressions to to the value | |
205 | * | |
206 | * TODO: Ask RICE to create an interface for ValidCharactersConstraint so we can return that instead of the generic constraint | |
207 | */ | |
208 | public ValidCharactersConstraintInfc getValidCharactersConstraint(); | |
209 | } |