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 boolean _cache = true; |
52 |
| |
53 |
| |
54 |
| private Collection _aliasNames = Collections.EMPTY_LIST; |
55 |
| |
56 |
| |
57 |
| private String _parameterName; |
58 |
| |
59 |
| |
60 |
| private boolean _deprecated = false; |
61 |
| |
62 |
| |
63 |
| |
64 |
| |
65 |
| |
66 |
| |
67 |
1061
| public String getType()
|
68 |
| { |
69 |
1061
| return _type;
|
70 |
| } |
71 |
| |
72 |
| |
73 |
| |
74 |
| |
75 |
| |
76 |
| |
77 |
3815
| public boolean isRequired()
|
78 |
| { |
79 |
3815
| return _required;
|
80 |
| } |
81 |
| |
82 |
1072
| public void setRequired(boolean value)
|
83 |
| { |
84 |
1072
| _required = value;
|
85 |
| } |
86 |
| |
87 |
| |
88 |
| |
89 |
| |
90 |
| |
91 |
| |
92 |
42
| public void setType(String value)
|
93 |
| { |
94 |
42
| _type = value;
|
95 |
| } |
96 |
| |
97 |
| |
98 |
| |
99 |
| |
100 |
| |
101 |
| |
102 |
| |
103 |
1
| public String getDescription()
|
104 |
| { |
105 |
1
| return _description;
|
106 |
| } |
107 |
| |
108 |
| |
109 |
| |
110 |
| |
111 |
| |
112 |
| |
113 |
| |
114 |
746
| public void setDescription(String description)
|
115 |
| { |
116 |
746
| _description = description;
|
117 |
| } |
118 |
| |
119 |
| |
120 |
| |
121 |
| |
122 |
| |
123 |
1073
| public void setPropertyName(String propertyName)
|
124 |
| { |
125 |
1073
| _propertyName = propertyName;
|
126 |
| } |
127 |
| |
128 |
| |
129 |
| |
130 |
| |
131 |
| |
132 |
2140
| public String getPropertyName()
|
133 |
| { |
134 |
2140
| return _propertyName;
|
135 |
| } |
136 |
| |
137 |
| |
138 |
| |
139 |
| |
140 |
3296
| public String getDefaultValue()
|
141 |
| { |
142 |
3296
| return _defaultValue;
|
143 |
| } |
144 |
| |
145 |
| |
146 |
| |
147 |
| |
148 |
1069
| public void setDefaultValue(String defaultValue)
|
149 |
| { |
150 |
1069
| _defaultValue = defaultValue;
|
151 |
| } |
152 |
| |
153 |
| |
154 |
1063
| public boolean getCache()
|
155 |
| { |
156 |
1063
| return _cache;
|
157 |
| } |
158 |
| |
159 |
| |
160 |
1069
| public void setCache(boolean cache)
|
161 |
| { |
162 |
1069
| _cache = cache;
|
163 |
| } |
164 |
| |
165 |
| |
166 |
1080
| public Collection getAliasNames()
|
167 |
| { |
168 |
1080
| return _aliasNames;
|
169 |
| } |
170 |
| |
171 |
| |
172 |
7628
| public String getParameterName()
|
173 |
| { |
174 |
7628
| return _parameterName;
|
175 |
| } |
176 |
| |
177 |
| |
178 |
1074
| public void setAliases(String nameList)
|
179 |
| { |
180 |
1074
| if (HiveMind.isNonBlank(nameList))
|
181 |
| { |
182 |
6
| String[] names = TapestryUtils.split(nameList);
|
183 |
| |
184 |
6
| _aliasNames = Arrays.asList(names);
|
185 |
| } |
186 |
| } |
187 |
| |
188 |
| |
189 |
1083
| public void setParameterName(String name)
|
190 |
| { |
191 |
1083
| Defense.notNull(name, "name");
|
192 |
| |
193 |
1083
| _parameterName = name;
|
194 |
| } |
195 |
| |
196 |
| |
197 |
452
| public boolean isDeprecated()
|
198 |
| { |
199 |
452
| return _deprecated;
|
200 |
| } |
201 |
| |
202 |
| |
203 |
1070
| public void setDeprecated(boolean deprecated)
|
204 |
| { |
205 |
1070
| _deprecated = deprecated;
|
206 |
| } |
207 |
| |
208 |
| } |