|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.databeans.io.XmlDataObjectCodec livespace.services.XmlEntityCodec
public class XmlEntityCodec
XML codec for Livespace Entity types.
Field Summary | |
---|---|
boolean |
clearUndefinedProperties
Setting this to true (default = false) causes the decode logic to blow away any entity properties that were not defined in the XML. |
static String |
ELEMENT_TAG
|
Constructor Summary | |
---|---|
XmlEntityCodec()
|
|
XmlEntityCodec(EntityContainer container)
Create a codec that uses EntityContainer.createEntity(String, String) to create
new entities. |
Method Summary | |
---|---|
boolean |
canEncode(XmlEncodeContext context,
Object value)
Test if this codec can encode a given object. |
Object |
decode(XmlDecodeContext context,
org.jdom.Element element)
Decode an XML representation into a value. |
org.jdom.Element |
encode(XmlEncodeContext context,
Object value)
Generate an XML representation of an object. |
static void |
register()
Register this codec for XML IO. |
protected void |
setObjectValue(IDataObject object,
Object property,
Object value)
Called by data object decoders to set property values. |
Methods inherited from class dsto.dfc.databeans.io.XmlDataObjectCodec |
---|
decodeDataBean, decodeDataObject, decodeDataObjectProperty, decodeJavaBean, encodeDataBean, encodeDataBeanProperties, encodeDataObject, encodeDataObjectProperty, encodeJavaBean, shouldPreserveIdentity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ELEMENT_TAG
public boolean clearUndefinedProperties
Constructor Detail |
---|
public XmlEntityCodec()
public XmlEntityCodec(EntityContainer container)
EntityContainer.createEntity(String, String)
to create
new entities.
Method Detail |
---|
public static void register()
public boolean canEncode(XmlEncodeContext context, Object value)
XmlEncoder
canEncode
in interface XmlEncoder
canEncode
in class XmlDataObjectCodec
context
- The current encode context.value
- The value. May be null.
public org.jdom.Element encode(XmlEncodeContext context, Object value)
XmlEncoder
encode
in interface XmlEncoder
encode
in class XmlDataObjectCodec
context
- The encoding context.value
- The value to be encoded.
public Object decode(XmlDecodeContext context, org.jdom.Element element) throws IllegalArgumentException, ClassNotFoundException
XmlDecoder
decode
in interface XmlDecoder
decode
in class XmlDataObjectCodec
context
- The decode context.element
- The element to decode.
IllegalArgumentException
- if an error is found in the structure
of the document.
ClassNotFoundException
- if a referenced class cannot be found.protected void setObjectValue(IDataObject object, Object property, Object value)
setObjectValue
in class XmlDataObjectCodec
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |