Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.automation.server.jaxrs.io.marshallers
Class PrimitiveMarshaller<T>

java.lang.Object
  extended by org.nuxeo.ecm.automation.server.jaxrs.io.marshallers.PrimitiveMarshaller<T>
All Implemented Interfaces:
JsonMarshaller<T>

public final class PrimitiveMarshaller<T>
extends Object
implements JsonMarshaller<T>


Constructor Summary
PrimitiveMarshaller(Class<T> clazz)
           
 
Method Summary
 Class<T> getJavaType()
          The marshalled java type
 String getType()
          The type name that appears in json content
 String newReference(T value)
          Returns a server reference to a POJO object
 T read(net.sf.json.JSONObject json)
          Builds and returns a POJO from the JSON object
 T resolveReference(String ref)
          Resolve a reference and returns the POJO object
 void write(net.sf.json.JSONObject json, Object value)
          Writes in the JSON object the POJO's data
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrimitiveMarshaller

public PrimitiveMarshaller(Class<T> clazz)
Method Detail

getType

public String getType()
Description copied from interface: JsonMarshaller
The type name that appears in json content

Specified by:
getType in interface JsonMarshaller<T>
Returns:

getJavaType

public Class<T> getJavaType()
Description copied from interface: JsonMarshaller
The marshalled java type

Specified by:
getJavaType in interface JsonMarshaller<T>
Returns:

resolveReference

public T resolveReference(String ref)
Description copied from interface: JsonMarshaller
Resolve a reference and returns the POJO object

Specified by:
resolveReference in interface JsonMarshaller<T>
Returns:

newReference

public String newReference(T value)
Description copied from interface: JsonMarshaller
Returns a server reference to a POJO object

Specified by:
newReference in interface JsonMarshaller<T>
Returns:

read

public T read(net.sf.json.JSONObject json)
Description copied from interface: JsonMarshaller
Builds and returns a POJO from the JSON object

Specified by:
read in interface JsonMarshaller<T>
Returns:

write

public void write(net.sf.json.JSONObject json,
                  Object value)
Description copied from interface: JsonMarshaller
Writes in the JSON object the POJO's data

Specified by:
write in interface JsonMarshaller<T>

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.