Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AttributeField |
|
| 1.0;1 |
1 | package org.kuali.rice.core.api.uif; | |
2 | ||
3 | import java.util.Collection; | |
4 | ||
5 | /** | |
6 | * This interface describes an attribute. It can be considered the definition for an attribute. | |
7 | * It also contains preferred rendering instructions for an attribute. ie when rendering an attribute | |
8 | * in a user interface use this control with these widgets. | |
9 | */ | |
10 | public interface AttributeField { | |
11 | ||
12 | /** | |
13 | * The name of the attribute. Cannot be null or blank. | |
14 | * | |
15 | * @return the name. | |
16 | */ | |
17 | String getName(); | |
18 | ||
19 | /** | |
20 | * The dataType of the attribute. Currently {@link DataType.COMPLEX} is not supported. Can be null. | |
21 | * | |
22 | * @return the datatype or null. | |
23 | */ | |
24 | DataType getDataType(); | |
25 | ||
26 | /** | |
27 | * The short label of the attribute. Can be null. | |
28 | * | |
29 | * @return the short label or null. | |
30 | */ | |
31 | String getShortLabel(); | |
32 | ||
33 | /** | |
34 | * The long label of the attribute. Can be null. | |
35 | * | |
36 | * @return the long label or null. | |
37 | */ | |
38 | String getLongLabel(); | |
39 | ||
40 | /** | |
41 | * The help summary of the attribute. Can be null. | |
42 | * | |
43 | * @return the help summary or null. | |
44 | */ | |
45 | String getHelpSummary(); | |
46 | ||
47 | /** | |
48 | * The help constraint of the attribute. Can be null. | |
49 | * | |
50 | * @return the help constraint or null. | |
51 | */ | |
52 | String getHelpConstraint(); | |
53 | ||
54 | /** | |
55 | * The help description of the attribute. Can be null. | |
56 | * | |
57 | * @return the help description or null. | |
58 | */ | |
59 | String getHelpDescription(); | |
60 | ||
61 | /** | |
62 | * Should the attribute always be in uppercase. Defaults to false. | |
63 | * | |
64 | * @return force uppercase. | |
65 | */ | |
66 | boolean isForceUpperCase(); | |
67 | ||
68 | /** | |
69 | * The inclusive minimum length of the attribute. Can be null. Cannot be less than 1. | |
70 | * | |
71 | * @return minimum length. | |
72 | */ | |
73 | Integer getMinLength(); | |
74 | ||
75 | /** | |
76 | * The inclusive maximum length of the attribute. Can be null. Cannot be less than 1. | |
77 | * | |
78 | * @return maximum length. | |
79 | */ | |
80 | Integer getMaxLength(); | |
81 | ||
82 | /** | |
83 | * The inclusive minimum value of the attribute. Can be null. | |
84 | * | |
85 | * @return minimum value. | |
86 | */ | |
87 | Integer getMinValue(); | |
88 | ||
89 | /** | |
90 | * The inclusive maximum value of the attribute. Can be null. | |
91 | * | |
92 | * @return maximum value. | |
93 | */ | |
94 | Integer getMaxValue(); | |
95 | ||
96 | /** | |
97 | * The regex constraint to apply to the attribute field for validation. Can be null. | |
98 | * | |
99 | * @return the constraint. | |
100 | */ | |
101 | String getRegexConstraint(); | |
102 | ||
103 | /** | |
104 | * The message to display if the regex constraint fails. Can be null. | |
105 | * | |
106 | * @return the constraint message. | |
107 | */ | |
108 | String getRegexContraintMsg(); | |
109 | ||
110 | /** | |
111 | * Whether the attribute is a required attribute. Defaults to false. | |
112 | * @return whether the attribute is required. | |
113 | */ | |
114 | boolean isRequired(); | |
115 | ||
116 | /** | |
117 | * The default values for the attribute. In the case where the "control" associated | |
118 | * with the attribute only allows a single default value then only one item in this list will be used. | |
119 | * Cannot be null. Will always return an immutable list. | |
120 | * | |
121 | * @return collection of default values | |
122 | */ | |
123 | Collection<String> getDefaultValues(); | |
124 | ||
125 | /** | |
126 | * The control associated with the attribute. Can be null. | |
127 | * @return the control. | |
128 | */ | |
129 | Control getControl(); | |
130 | ||
131 | /** | |
132 | * The widgets for the attribute. Will always return an immutable list. | |
133 | * | |
134 | * @return collection of widgets | |
135 | */ | |
136 | Collection<? extends Widget> getWidgets(); | |
137 | ||
138 | } |