1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.tapestry.spec; |
16 |
| |
17 |
| import java.util.Arrays; |
18 |
| import java.util.Collection; |
19 |
| import java.util.Collections; |
20 |
| |
21 |
| import org.apache.hivemind.HiveMind; |
22 |
| import org.apache.hivemind.impl.BaseLocatable; |
23 |
| import org.apache.hivemind.util.Defense; |
24 |
| import org.apache.tapestry.TapestryUtils; |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| |
33 |
| |
34 |
| |
35 |
| public class ParameterSpecification extends BaseLocatable implements IParameterSpecification |
36 |
| { |
37 |
| private boolean _required = false; |
38 |
| |
39 |
| private String _type; |
40 |
| |
41 |
| |
42 |
| private String _description; |
43 |
| |
44 |
| |
45 |
| private String _propertyName; |
46 |
| |
47 |
| |
48 |
| private String _defaultValue; |
49 |
| |
50 |
| |
51 |
| private String _defaultBindingType; |
52 |
| |
53 |
| |
54 |
| private boolean _cache = true; |
55 |
| |
56 |
| |
57 |
| private Collection _aliasNames = Collections.EMPTY_LIST; |
58 |
| |
59 |
| |
60 |
| private String _parameterName; |
61 |
| |
62 |
| |
63 |
| private boolean _deprecated = false; |
64 |
| |
65 |
| |
66 |
| |
67 |
| |
68 |
| |
69 |
| |
70 |
1091
| public String getType()
|
71 |
| { |
72 |
1091
| return _type;
|
73 |
| } |
74 |
| |
75 |
| |
76 |
| |
77 |
| |
78 |
| |
79 |
| |
80 |
3865
| public boolean isRequired()
|
81 |
| { |
82 |
3865
| return _required;
|
83 |
| } |
84 |
| |
85 |
1103
| public void setRequired(boolean value)
|
86 |
| { |
87 |
1103
| _required = value;
|
88 |
| } |
89 |
| |
90 |
| |
91 |
| |
92 |
| |
93 |
| |
94 |
| |
95 |
41
| public void setType(String value)
|
96 |
| { |
97 |
41
| _type = value;
|
98 |
| } |
99 |
| |
100 |
| |
101 |
| |
102 |
| |
103 |
| |
104 |
| |
105 |
| |
106 |
1
| public String getDescription()
|
107 |
| { |
108 |
1
| return _description;
|
109 |
| } |
110 |
| |
111 |
| |
112 |
| |
113 |
| |
114 |
| |
115 |
| |
116 |
| |
117 |
759
| public void setDescription(String description)
|
118 |
| { |
119 |
759
| _description = description;
|
120 |
| } |
121 |
| |
122 |
| |
123 |
| |
124 |
| |
125 |
| |
126 |
1103
| public void setPropertyName(String propertyName)
|
127 |
| { |
128 |
1103
| _propertyName = propertyName;
|
129 |
| } |
130 |
| |
131 |
| |
132 |
| |
133 |
| |
134 |
| |
135 |
2200
| public String getPropertyName()
|
136 |
| { |
137 |
2200
| return _propertyName;
|
138 |
| } |
139 |
| |
140 |
| |
141 |
| |
142 |
| |
143 |
3367
| public String getDefaultValue()
|
144 |
| { |
145 |
3367
| return _defaultValue;
|
146 |
| } |
147 |
| |
148 |
| |
149 |
| |
150 |
| |
151 |
1100
| public void setDefaultValue(String defaultValue)
|
152 |
| { |
153 |
1100
| _defaultValue = defaultValue;
|
154 |
| } |
155 |
| |
156 |
| |
157 |
1586
| public String getDefaultBindingType()
|
158 |
| { |
159 |
1586
| return _defaultBindingType;
|
160 |
| } |
161 |
| |
162 |
| |
163 |
1100
| public void setDefaultBindingType(String defaultBindingType)
|
164 |
| { |
165 |
1100
| _defaultBindingType = defaultBindingType;
|
166 |
| } |
167 |
| |
168 |
| |
169 |
1093
| public boolean getCache()
|
170 |
| { |
171 |
1093
| return _cache;
|
172 |
| } |
173 |
| |
174 |
| |
175 |
1100
| public void setCache(boolean cache)
|
176 |
| { |
177 |
1100
| _cache = cache;
|
178 |
| } |
179 |
| |
180 |
| |
181 |
1110
| public Collection getAliasNames()
|
182 |
| { |
183 |
1110
| return _aliasNames;
|
184 |
| } |
185 |
| |
186 |
| |
187 |
6684
| public String getParameterName()
|
188 |
| { |
189 |
6684
| return _parameterName;
|
190 |
| } |
191 |
| |
192 |
| |
193 |
1104
| public void setAliases(String nameList)
|
194 |
| { |
195 |
1104
| if (HiveMind.isNonBlank(nameList))
|
196 |
| { |
197 |
5
| String[] names = TapestryUtils.split(nameList);
|
198 |
| |
199 |
5
| _aliasNames = Arrays.asList(names);
|
200 |
| } |
201 |
| } |
202 |
| |
203 |
| |
204 |
1109
| public void setParameterName(String name)
|
205 |
| { |
206 |
1109
| Defense.notNull(name, "name");
|
207 |
| |
208 |
1109
| _parameterName = name;
|
209 |
| } |
210 |
| |
211 |
| |
212 |
489
| public boolean isDeprecated()
|
213 |
| { |
214 |
489
| return _deprecated;
|
215 |
| } |
216 |
| |
217 |
| |
218 |
1101
| public void setDeprecated(boolean deprecated)
|
219 |
| { |
220 |
1101
| _deprecated = deprecated;
|
221 |
| } |
222 |
| |
223 |
| } |