org.identityconnectors.framework.impl.serializer.xml
Class XmlObjectEncoder

java.lang.Object
  extended by org.identityconnectors.framework.impl.serializer.xml.XmlObjectEncoder
All Implemented Interfaces:
ObjectEncoder

public class XmlObjectEncoder
extends Object
implements ObjectEncoder


Constructor Summary
XmlObjectEncoder(StringBuilder builder)
           
 
Method Summary
 void writeBooleanContents(boolean v)
          Writes the value in-line.
 void writeBooleanField(String fieldName, boolean v)
          Writes a boolean.
 void writeByteArrayContents(byte[] v)
          Special case for byte [] that uses base64 encoding for XML
 void writeClassContents(Class<?> v)
          Writes the value in-line.
 void writeClassField(String name, Class<?> v)
          Writes a Class.
 void writeDoubleContents(double v)
          Writes the value in-line.
 void writeDoubleField(String fieldName, double v)
          Writes a double.
 void writeFloatContents(float v)
          Writes the value in-line.
 void writeFloatField(String fieldName, float v)
          Writes a float.
 void writeIntContents(int v)
          Writes the value in-line.
 void writeIntField(String fieldName, int v)
          Writes an int.
 void writeLongContents(long v)
          Writes the value in-line.
 void writeLongField(String fieldName, long v)
          Writes a long.
 String writeObject(Object o)
           
 void writeObjectContents(Object o)
          Writes a sub-object
 void writeObjectField(String fieldName, Object object, boolean inline)
          Writes an object using the appropriate serializer for that object
 void writeStringContents(String str)
          Writes the value in-line.
 void writeStringField(String fieldName, String str)
          Writes a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlObjectEncoder

public XmlObjectEncoder(StringBuilder builder)
Method Detail

writeObject

public String writeObject(Object o)

writeBooleanContents

public void writeBooleanContents(boolean v)
Description copied from interface: ObjectEncoder
Writes the value in-line.

Specified by:
writeBooleanContents in interface ObjectEncoder

writeBooleanField

public void writeBooleanField(String fieldName,
                              boolean v)
Description copied from interface: ObjectEncoder
Writes a boolean.

Specified by:
writeBooleanField in interface ObjectEncoder

writeByteArrayContents

public void writeByteArrayContents(byte[] v)
Description copied from interface: ObjectEncoder
Special case for byte [] that uses base64 encoding for XML

Specified by:
writeByteArrayContents in interface ObjectEncoder

writeClassContents

public void writeClassContents(Class<?> v)
Description copied from interface: ObjectEncoder
Writes the value in-line.

Specified by:
writeClassContents in interface ObjectEncoder

writeClassField

public void writeClassField(String name,
                            Class<?> v)
Description copied from interface: ObjectEncoder
Writes a Class.

Specified by:
writeClassField in interface ObjectEncoder

writeDoubleContents

public void writeDoubleContents(double v)
Description copied from interface: ObjectEncoder
Writes the value in-line.

Specified by:
writeDoubleContents in interface ObjectEncoder

writeDoubleField

public void writeDoubleField(String fieldName,
                             double v)
Description copied from interface: ObjectEncoder
Writes a double.

Specified by:
writeDoubleField in interface ObjectEncoder

writeFloatContents

public void writeFloatContents(float v)
Description copied from interface: ObjectEncoder
Writes the value in-line.

Specified by:
writeFloatContents in interface ObjectEncoder

writeFloatField

public void writeFloatField(String fieldName,
                            float v)
Description copied from interface: ObjectEncoder
Writes a float.

Specified by:
writeFloatField in interface ObjectEncoder

writeIntContents

public void writeIntContents(int v)
Description copied from interface: ObjectEncoder
Writes the value in-line.

Specified by:
writeIntContents in interface ObjectEncoder

writeIntField

public void writeIntField(String fieldName,
                          int v)
Description copied from interface: ObjectEncoder
Writes an int.

Specified by:
writeIntField in interface ObjectEncoder

writeLongContents

public void writeLongContents(long v)
Description copied from interface: ObjectEncoder
Writes the value in-line.

Specified by:
writeLongContents in interface ObjectEncoder

writeLongField

public void writeLongField(String fieldName,
                           long v)
Description copied from interface: ObjectEncoder
Writes a long.

Specified by:
writeLongField in interface ObjectEncoder

writeObjectContents

public void writeObjectContents(Object o)
Description copied from interface: ObjectEncoder
Writes a sub-object

Specified by:
writeObjectContents in interface ObjectEncoder
Parameters:
o - The object to write

writeObjectField

public void writeObjectField(String fieldName,
                             Object object,
                             boolean inline)
Description copied from interface: ObjectEncoder
Writes an object using the appropriate serializer for that object

Specified by:
writeObjectField in interface ObjectEncoder
inline - Ignore for binary serialization. For xml serialization, this causes us not to have a sub-element. When inlining, polymorphic typing is not supported.

writeStringContents

public void writeStringContents(String str)
Description copied from interface: ObjectEncoder
Writes the value in-line.

Specified by:
writeStringContents in interface ObjectEncoder

writeStringField

public void writeStringField(String fieldName,
                             String str)
Description copied from interface: ObjectEncoder
Writes a String.

Specified by:
writeStringField in interface ObjectEncoder


Copyright © 2011. All Rights Reserved.