root / trunk / frameworks / _fwAndami / src / com / iver / andami / plugins / config / generate / ActionToolDescriptor.java @ 9683
History | View | Annotate | Download (16.2 KB)
1 |
/*
|
---|---|
2 |
* This class was automatically generated with
|
3 |
* <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
|
4 |
* Schema.
|
5 |
* $Id: ActionToolDescriptor.java 9683 2007-01-11 17:35:35Z cesar $
|
6 |
*/
|
7 |
|
8 |
package com.iver.andami.plugins.config.generate; |
9 |
|
10 |
//---------------------------------/
|
11 |
//- Imported classes and packages -/
|
12 |
//---------------------------------/
|
13 |
|
14 |
import org.exolab.castor.mapping.AccessMode; |
15 |
import org.exolab.castor.xml.TypeValidator; |
16 |
import org.exolab.castor.xml.XMLFieldDescriptor; |
17 |
import org.exolab.castor.xml.validators.*; |
18 |
|
19 |
/**
|
20 |
* Class ActionToolDescriptor.
|
21 |
*
|
22 |
* @version $Revision: 9683 $ $Date: 2007-01-11 18:35:35 +0100 (Thu, 11 Jan 2007) $
|
23 |
*/
|
24 |
public class ActionToolDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { |
25 |
|
26 |
|
27 |
//--------------------------/
|
28 |
//- Class/Member Variables -/
|
29 |
//--------------------------/
|
30 |
|
31 |
/**
|
32 |
* Field nsPrefix
|
33 |
*/
|
34 |
private java.lang.String nsPrefix;
|
35 |
|
36 |
/**
|
37 |
* Field nsURI
|
38 |
*/
|
39 |
private java.lang.String nsURI;
|
40 |
|
41 |
/**
|
42 |
* Field xmlName
|
43 |
*/
|
44 |
private java.lang.String xmlName;
|
45 |
|
46 |
/**
|
47 |
* Field identity
|
48 |
*/
|
49 |
private org.exolab.castor.xml.XMLFieldDescriptor identity;
|
50 |
|
51 |
|
52 |
//----------------/
|
53 |
//- Constructors -/
|
54 |
//----------------/
|
55 |
|
56 |
public ActionToolDescriptor() {
|
57 |
super();
|
58 |
xmlName = "action-tool";
|
59 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
|
60 |
org.exolab.castor.xml.XMLFieldHandler handler = null;
|
61 |
org.exolab.castor.xml.FieldValidator fieldValidator = null;
|
62 |
//-- initialize attribute descriptors
|
63 |
|
64 |
//-- _text
|
65 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_text", "text", org.exolab.castor.xml.NodeType.Attribute); |
66 |
desc.setImmutable(true);
|
67 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
68 |
public java.lang.Object getValue( java.lang.Object object )
|
69 |
throws IllegalStateException |
70 |
{ |
71 |
ActionTool target = (ActionTool) object; |
72 |
return target.getText();
|
73 |
} |
74 |
public void setValue( java.lang.Object object, java.lang.Object value) |
75 |
throws IllegalStateException, IllegalArgumentException |
76 |
{ |
77 |
try {
|
78 |
ActionTool target = (ActionTool) object; |
79 |
target.setText( (java.lang.String) value); |
80 |
} |
81 |
catch (java.lang.Exception ex) {
|
82 |
throw new IllegalStateException(ex.toString()); |
83 |
} |
84 |
} |
85 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
86 |
return null; |
87 |
} |
88 |
} ); |
89 |
desc.setHandler(handler); |
90 |
addFieldDescriptor(desc); |
91 |
|
92 |
//-- validation code for: _text
|
93 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
94 |
{ //-- local scope
|
95 |
StringValidator typeValidator = new StringValidator();
|
96 |
typeValidator.setWhiteSpace("preserve");
|
97 |
fieldValidator.setValidator(typeValidator); |
98 |
} |
99 |
desc.setValidator(fieldValidator); |
100 |
//-- _name
|
101 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); |
102 |
desc.setImmutable(true);
|
103 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
104 |
public java.lang.Object getValue( java.lang.Object object )
|
105 |
throws IllegalStateException |
106 |
{ |
107 |
ActionTool target = (ActionTool) object; |
108 |
return target.getName();
|
109 |
} |
110 |
public void setValue( java.lang.Object object, java.lang.Object value) |
111 |
throws IllegalStateException, IllegalArgumentException |
112 |
{ |
113 |
try {
|
114 |
ActionTool target = (ActionTool) object; |
115 |
target.setName( (java.lang.String) value); |
116 |
} |
117 |
catch (java.lang.Exception ex) {
|
118 |
throw new IllegalStateException(ex.toString()); |
119 |
} |
120 |
} |
121 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
122 |
return null; |
123 |
} |
124 |
} ); |
125 |
desc.setHandler(handler); |
126 |
addFieldDescriptor(desc); |
127 |
|
128 |
//-- validation code for: _name
|
129 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
130 |
{ //-- local scope
|
131 |
StringValidator typeValidator = new StringValidator();
|
132 |
typeValidator.setWhiteSpace("preserve");
|
133 |
fieldValidator.setValidator(typeValidator); |
134 |
} |
135 |
desc.setValidator(fieldValidator); |
136 |
//-- _actionCommand
|
137 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_actionCommand", "action-command", org.exolab.castor.xml.NodeType.Attribute); |
138 |
desc.setImmutable(true);
|
139 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
140 |
public java.lang.Object getValue( java.lang.Object object )
|
141 |
throws IllegalStateException |
142 |
{ |
143 |
ActionTool target = (ActionTool) object; |
144 |
return target.getActionCommand();
|
145 |
} |
146 |
public void setValue( java.lang.Object object, java.lang.Object value) |
147 |
throws IllegalStateException, IllegalArgumentException |
148 |
{ |
149 |
try {
|
150 |
ActionTool target = (ActionTool) object; |
151 |
target.setActionCommand( (java.lang.String) value); |
152 |
} |
153 |
catch (java.lang.Exception ex) {
|
154 |
throw new IllegalStateException(ex.toString()); |
155 |
} |
156 |
} |
157 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
158 |
return null; |
159 |
} |
160 |
} ); |
161 |
desc.setHandler(handler); |
162 |
addFieldDescriptor(desc); |
163 |
|
164 |
//-- validation code for: _actionCommand
|
165 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
166 |
{ //-- local scope
|
167 |
StringValidator typeValidator = new StringValidator();
|
168 |
typeValidator.setWhiteSpace("preserve");
|
169 |
fieldValidator.setValidator(typeValidator); |
170 |
} |
171 |
desc.setValidator(fieldValidator); |
172 |
//-- _icon
|
173 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_icon", "icon", org.exolab.castor.xml.NodeType.Attribute); |
174 |
desc.setImmutable(true);
|
175 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
176 |
public java.lang.Object getValue( java.lang.Object object )
|
177 |
throws IllegalStateException |
178 |
{ |
179 |
ActionTool target = (ActionTool) object; |
180 |
return target.getIcon();
|
181 |
} |
182 |
public void setValue( java.lang.Object object, java.lang.Object value) |
183 |
throws IllegalStateException, IllegalArgumentException |
184 |
{ |
185 |
try {
|
186 |
ActionTool target = (ActionTool) object; |
187 |
target.setIcon( (java.lang.String) value); |
188 |
} |
189 |
catch (java.lang.Exception ex) {
|
190 |
throw new IllegalStateException(ex.toString()); |
191 |
} |
192 |
} |
193 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
194 |
return null; |
195 |
} |
196 |
} ); |
197 |
desc.setHandler(handler); |
198 |
desc.setRequired(true);
|
199 |
addFieldDescriptor(desc); |
200 |
|
201 |
//-- validation code for: _icon
|
202 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
203 |
fieldValidator.setMinOccurs(1);
|
204 |
{ //-- local scope
|
205 |
StringValidator typeValidator = new StringValidator();
|
206 |
typeValidator.setWhiteSpace("preserve");
|
207 |
fieldValidator.setValidator(typeValidator); |
208 |
} |
209 |
desc.setValidator(fieldValidator); |
210 |
//-- _last
|
211 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_last", "last", org.exolab.castor.xml.NodeType.Attribute); |
212 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
213 |
public java.lang.Object getValue( java.lang.Object object )
|
214 |
throws IllegalStateException |
215 |
{ |
216 |
ActionTool target = (ActionTool) object; |
217 |
if(!target.hasLast())
|
218 |
return null; |
219 |
return (target.getLast() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
|
220 |
} |
221 |
public void setValue( java.lang.Object object, java.lang.Object value) |
222 |
throws IllegalStateException, IllegalArgumentException |
223 |
{ |
224 |
try {
|
225 |
ActionTool target = (ActionTool) object; |
226 |
// if null, use delete method for optional primitives
|
227 |
if (value == null) { |
228 |
target.deleteLast(); |
229 |
return;
|
230 |
} |
231 |
target.setLast( ((java.lang.Boolean)value).booleanValue()); |
232 |
} |
233 |
catch (java.lang.Exception ex) {
|
234 |
throw new IllegalStateException(ex.toString()); |
235 |
} |
236 |
} |
237 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
238 |
return null; |
239 |
} |
240 |
} ); |
241 |
desc.setHandler(handler); |
242 |
addFieldDescriptor(desc); |
243 |
|
244 |
//-- validation code for: _last
|
245 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
246 |
{ //-- local scope
|
247 |
BooleanValidator typeValidator = new BooleanValidator();
|
248 |
fieldValidator.setValidator(typeValidator); |
249 |
} |
250 |
desc.setValidator(fieldValidator); |
251 |
//-- _tooltip
|
252 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_tooltip", "tooltip", org.exolab.castor.xml.NodeType.Attribute); |
253 |
desc.setImmutable(true);
|
254 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
255 |
public java.lang.Object getValue( java.lang.Object object )
|
256 |
throws IllegalStateException |
257 |
{ |
258 |
ActionTool target = (ActionTool) object; |
259 |
return target.getTooltip();
|
260 |
} |
261 |
public void setValue( java.lang.Object object, java.lang.Object value) |
262 |
throws IllegalStateException, IllegalArgumentException |
263 |
{ |
264 |
try {
|
265 |
ActionTool target = (ActionTool) object; |
266 |
target.setTooltip( (java.lang.String) value); |
267 |
} |
268 |
catch (java.lang.Exception ex) {
|
269 |
throw new IllegalStateException(ex.toString()); |
270 |
} |
271 |
} |
272 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
273 |
return null; |
274 |
} |
275 |
} ); |
276 |
desc.setHandler(handler); |
277 |
addFieldDescriptor(desc); |
278 |
|
279 |
//-- validation code for: _tooltip
|
280 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
281 |
{ //-- local scope
|
282 |
StringValidator typeValidator = new StringValidator();
|
283 |
typeValidator.setWhiteSpace("preserve");
|
284 |
fieldValidator.setValidator(typeValidator); |
285 |
} |
286 |
desc.setValidator(fieldValidator); |
287 |
//-- _enableText
|
288 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_enableText", "enable-text", org.exolab.castor.xml.NodeType.Attribute); |
289 |
desc.setImmutable(true);
|
290 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
291 |
public java.lang.Object getValue( java.lang.Object object )
|
292 |
throws IllegalStateException |
293 |
{ |
294 |
ActionTool target = (ActionTool) object; |
295 |
return target.getEnableText();
|
296 |
} |
297 |
public void setValue( java.lang.Object object, java.lang.Object value) |
298 |
throws IllegalStateException, IllegalArgumentException |
299 |
{ |
300 |
try {
|
301 |
ActionTool target = (ActionTool) object; |
302 |
target.setEnableText( (java.lang.String) value); |
303 |
} |
304 |
catch (java.lang.Exception ex) {
|
305 |
throw new IllegalStateException(ex.toString()); |
306 |
} |
307 |
} |
308 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
309 |
return null; |
310 |
} |
311 |
} ); |
312 |
desc.setHandler(handler); |
313 |
addFieldDescriptor(desc); |
314 |
|
315 |
//-- validation code for: _enableText
|
316 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
317 |
{ //-- local scope
|
318 |
StringValidator typeValidator = new StringValidator();
|
319 |
typeValidator.setWhiteSpace("preserve");
|
320 |
fieldValidator.setValidator(typeValidator); |
321 |
} |
322 |
desc.setValidator(fieldValidator); |
323 |
//-- _position
|
324 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); |
325 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
326 |
public java.lang.Object getValue( java.lang.Object object )
|
327 |
throws IllegalStateException |
328 |
{ |
329 |
ActionTool target = (ActionTool) object; |
330 |
if(!target.hasPosition())
|
331 |
return null; |
332 |
return new java.lang.Integer(target.getPosition()); |
333 |
} |
334 |
public void setValue( java.lang.Object object, java.lang.Object value) |
335 |
throws IllegalStateException, IllegalArgumentException |
336 |
{ |
337 |
try {
|
338 |
ActionTool target = (ActionTool) object; |
339 |
// if null, use delete method for optional primitives
|
340 |
if (value == null) { |
341 |
target.deletePosition(); |
342 |
return;
|
343 |
} |
344 |
target.setPosition( ((java.lang.Integer)value).intValue()); |
345 |
} |
346 |
catch (java.lang.Exception ex) {
|
347 |
throw new IllegalStateException(ex.toString()); |
348 |
} |
349 |
} |
350 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
351 |
return null; |
352 |
} |
353 |
} ); |
354 |
desc.setHandler(handler); |
355 |
addFieldDescriptor(desc); |
356 |
|
357 |
//-- validation code for: _position
|
358 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
359 |
{ //-- local scope
|
360 |
IntegerValidator typeValidator= new IntegerValidator();
|
361 |
fieldValidator.setValidator(typeValidator); |
362 |
} |
363 |
desc.setValidator(fieldValidator); |
364 |
//-- initialize element descriptors
|
365 |
|
366 |
} //-- com.iver.andami.plugins.config.generate.ActionToolDescriptor()
|
367 |
|
368 |
|
369 |
//-----------/
|
370 |
//- Methods -/
|
371 |
//-----------/
|
372 |
|
373 |
/**
|
374 |
* Method getAccessMode
|
375 |
*/
|
376 |
public org.exolab.castor.mapping.AccessMode getAccessMode()
|
377 |
{ |
378 |
return null; |
379 |
} //-- org.exolab.castor.mapping.AccessMode getAccessMode()
|
380 |
|
381 |
/**
|
382 |
* Method getExtends
|
383 |
*/
|
384 |
public org.exolab.castor.mapping.ClassDescriptor getExtends()
|
385 |
{ |
386 |
return null; |
387 |
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
|
388 |
|
389 |
/**
|
390 |
* Method getIdentity
|
391 |
*/
|
392 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
393 |
{ |
394 |
return identity;
|
395 |
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
396 |
|
397 |
/**
|
398 |
* Method getJavaClass
|
399 |
*/
|
400 |
public java.lang.Class getJavaClass()
|
401 |
{ |
402 |
return com.iver.andami.plugins.config.generate.ActionTool.class;
|
403 |
} //-- java.lang.Class getJavaClass()
|
404 |
|
405 |
/**
|
406 |
* Method getNameSpacePrefix
|
407 |
*/
|
408 |
public java.lang.String getNameSpacePrefix()
|
409 |
{ |
410 |
return nsPrefix;
|
411 |
} //-- java.lang.String getNameSpacePrefix()
|
412 |
|
413 |
/**
|
414 |
* Method getNameSpaceURI
|
415 |
*/
|
416 |
public java.lang.String getNameSpaceURI()
|
417 |
{ |
418 |
return nsURI;
|
419 |
} //-- java.lang.String getNameSpaceURI()
|
420 |
|
421 |
/**
|
422 |
* Method getValidator
|
423 |
*/
|
424 |
public org.exolab.castor.xml.TypeValidator getValidator()
|
425 |
{ |
426 |
return this; |
427 |
} //-- org.exolab.castor.xml.TypeValidator getValidator()
|
428 |
|
429 |
/**
|
430 |
* Method getXMLName
|
431 |
*/
|
432 |
public java.lang.String getXMLName()
|
433 |
{ |
434 |
return xmlName;
|
435 |
} //-- java.lang.String getXMLName()
|
436 |
|
437 |
} |