Revision 6101 trunk/frameworks/_fwAndami/src/com/iver/andami/config/generate/AndamiConfigDescriptor.java
AndamiConfigDescriptor.java | ||
---|---|---|
11 | 11 |
//- Imported classes and packages -/ |
12 | 12 |
//---------------------------------/ |
13 | 13 |
|
14 |
import org.exolab.castor.xml.validators.StringValidator; |
|
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.*; |
|
15 | 18 |
|
16 | 19 |
/** |
17 | 20 |
* Class AndamiConfigDescriptor. |
... | ... | |
169 | 172 |
fieldValidator.setValidator(typeValidator); |
170 | 173 |
} |
171 | 174 |
desc.setValidator(fieldValidator); |
175 |
//-- _lookAndFeel |
|
176 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_lookAndFeel", "lookAndFeel", org.exolab.castor.xml.NodeType.Attribute); |
|
177 |
desc.setImmutable(true); |
|
178 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
179 |
public java.lang.Object getValue( java.lang.Object object ) |
|
180 |
throws IllegalStateException |
|
181 |
{ |
|
182 |
AndamiConfig target = (AndamiConfig) object; |
|
183 |
return target.getLookAndFeel(); |
|
184 |
} |
|
185 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
186 |
throws IllegalStateException, IllegalArgumentException |
|
187 |
{ |
|
188 |
try { |
|
189 |
AndamiConfig target = (AndamiConfig) object; |
|
190 |
target.setLookAndFeel( (java.lang.String) value); |
|
191 |
} |
|
192 |
catch (java.lang.Exception ex) { |
|
193 |
throw new IllegalStateException(ex.toString()); |
|
194 |
} |
|
195 |
} |
|
196 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
197 |
return null; |
|
198 |
} |
|
199 |
} ); |
|
200 |
desc.setHandler(handler); |
|
201 |
addFieldDescriptor(desc); |
|
202 |
|
|
203 |
//-- validation code for: _lookAndFeel |
|
204 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
|
205 |
{ //-- local scope |
|
206 |
StringValidator typeValidator = new StringValidator(); |
|
207 |
typeValidator.setWhiteSpace("preserve"); |
|
208 |
fieldValidator.setValidator(typeValidator); |
|
209 |
} |
|
210 |
desc.setValidator(fieldValidator); |
|
172 | 211 |
//-- _pluginsDirectory |
173 | 212 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_pluginsDirectory", "pluginsDirectory", org.exolab.castor.xml.NodeType.Attribute); |
174 | 213 |
desc.setImmutable(true); |
Also available in: Unified diff