org.directwebremoting.convert
Class XmlBeanConverter
java.lang.Object
org.directwebremoting.convert.BasicObjectConverter
org.directwebremoting.convert.BeanConverter
org.directwebremoting.convert.XmlBeanConverter
- All Implemented Interfaces:
- Converter, NamedConverter
public class XmlBeanConverter
- extends BeanConverter
A Converter for Apache XMLBeans.
- Author:
- Joe Walker [joe at getahead dot ltd dot uk], Matthew Young [matthew dot young at forsakringskassan dot se]
|
Method Summary |
java.lang.Object |
convertInbound(java.lang.Class<?> paramType,
InboundVariable data)
Attempt to coerce the data from a string to an Object. |
java.util.Map<java.lang.String,Property> |
getPropertyMapFromClass(java.lang.Class<?> paramType,
boolean readRequired,
boolean writeRequired)
Get a map of property names to implementations of Property. |
| Methods inherited from class org.directwebremoting.convert.BasicObjectConverter |
convertOutbound, getConverterManager, getInclusions, getInstanceType, getJavascript, getJavascriptSuperClass, setConstructor, setConverterManager, setExclude, setImplementation, setInclude, setInstanceType, setJavascript, setJavascriptSuperClass |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlBeanConverter
public XmlBeanConverter()
convertInbound
public java.lang.Object convertInbound(java.lang.Class<?> paramType,
InboundVariable data)
throws ConversionException
- Description copied from interface:
Converter
- Attempt to coerce the data from a string to an Object.
If anything goes wrong with inbound conversion then we generally throw
an exception because we are converting data from the untrusted Internet
so we take the assumption that anything wrong is someone hacking.
- Specified by:
convertInbound in interface Converter- Overrides:
convertInbound in class BasicObjectConverter
- Parameters:
paramType - The type to convert todata - The data to convert
- Returns:
- The converted data, or null if the conversion was not possible
- Throws:
ConversionException - If the conversion failed for some reason
getPropertyMapFromClass
public java.util.Map<java.lang.String,Property> getPropertyMapFromClass(java.lang.Class<?> paramType,
boolean readRequired,
boolean writeRequired)
throws ConversionException
- Description copied from interface:
NamedConverter
- Get a map of property names to implementations of
Property.
HibernateBeanConverter (and maybe others) may want to provide
alternate versions of bean.getClass(), and we may wish to fake or hide
properties in some cases.
If you have a real object to investigate then it is probably better
to call NamedConverter.getPropertyMapFromObject(Object, boolean, boolean)
because that version can take into account extra runtime type info.
- Specified by:
getPropertyMapFromClass in interface NamedConverter- Overrides:
getPropertyMapFromClass in class BeanConverter
- Parameters:
paramType - The class to find bean info fromreadRequired - The properties returned must be readablewriteRequired - The properties returned must be writable
- Returns:
- An array of PropertyDescriptors describing the beans properties
- Throws:
ConversionException - If the introspection fails- See Also:
NamedConverter.getPropertyMapFromObject(Object, boolean, boolean)