Revision 5281 trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/ActionToolDescriptor.java
ActionToolDescriptor.java | ||
---|---|---|
11 | 11 |
//- Imported classes and packages -/ |
12 | 12 |
//---------------------------------/ |
13 | 13 |
|
14 |
import org.exolab.castor.xml.validators.BooleanValidator; |
|
15 |
import org.exolab.castor.xml.validators.StringValidator; |
|
14 |
import org.exolab.castor.xml.validators.*; |
|
16 | 15 |
|
17 | 16 |
/** |
18 | 17 |
* Class ActionToolDescriptor. |
... | ... | |
282 | 281 |
fieldValidator.setValidator(typeValidator); |
283 | 282 |
} |
284 | 283 |
desc.setValidator(fieldValidator); |
284 |
//-- _position |
|
285 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); |
|
286 |
desc.setImmutable(true); |
|
287 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
288 |
public java.lang.Object getValue( java.lang.Object object ) |
|
289 |
throws IllegalStateException |
|
290 |
{ |
|
291 |
ActionTool target = (ActionTool) object; |
|
292 |
return target.getPosition(); |
|
293 |
} |
|
294 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
295 |
throws IllegalStateException, IllegalArgumentException |
|
296 |
{ |
|
297 |
try { |
|
298 |
ActionTool target = (ActionTool) object; |
|
299 |
target.setPosition( (java.lang.String) value); |
|
300 |
} |
|
301 |
catch (java.lang.Exception ex) { |
|
302 |
throw new IllegalStateException(ex.toString()); |
|
303 |
} |
|
304 |
} |
|
305 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
306 |
return null; |
|
307 |
} |
|
308 |
} ); |
|
309 |
desc.setHandler(handler); |
|
310 |
addFieldDescriptor(desc); |
|
311 |
|
|
312 |
//-- validation code for: _position |
|
313 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
|
314 |
{ //-- local scope |
|
315 |
StringValidator typeValidator = new StringValidator(); |
|
316 |
typeValidator.setWhiteSpace("preserve"); |
|
317 |
fieldValidator.setValidator(typeValidator); |
|
318 |
} |
|
319 |
desc.setValidator(fieldValidator); |
|
285 | 320 |
//-- initialize element descriptors |
286 | 321 |
|
287 | 322 |
} //-- com.iver.andami.plugins.config.generate.ActionToolDescriptor() |
Also available in: Unified diff