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