Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.automation.server.jaxrs.io
Interface JsonMarshaller<T>

All Known Implementing Classes:
BeanMarshaller, DateMarshaller, PrimitiveMarshaller

public interface JsonMarshaller<T>

Plugs in automation server new input/output type marshalling logic.

Author:
matic

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 o, Object value)
          Writes in the JSON object the POJO's data
 

Method Detail

getType

String getType()
The type name that appears in json content

Returns:

getJavaType

Class<T> getJavaType()
The marshalled java type

Returns:

resolveReference

T resolveReference(String ref)
Resolve a reference and returns the POJO object

Parameters:
ref -
Returns:

newReference

String newReference(T value)
Returns a server reference to a POJO object

Parameters:
value -
Returns:

read

T read(net.sf.json.JSONObject json)
Builds and returns a POJO from the JSON object

Parameters:
json -
Returns:

write

void write(net.sf.json.JSONObject o,
           Object value)
Writes in the JSON object the POJO's data

Parameters:
o -
value -

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.