Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.automation.client.jaxrs.spi
Interface JsonMarshaller<T>

Type Parameters:
T -
All Known Implementing Classes:
BeanMarshaller, DateMarshaller, DocumentMarshaller, DocumentsMarshaller, ExceptionMarshaller, LoginMarshaller, PrimitiveMarshaller

public interface JsonMarshaller<T>

Plugs in automation client new input/output marshalling logic.

Author:
matic

Method Summary
 Class<T> getJavaType()
          The marshalled java type
 String getReference(T value)
          Gets an input reference from the POJO object that can be fetched server side.
 String getType()
          The type name that appears in serialization
 T read(net.sf.json.JSONObject object)
          Builds and returns a POJO from the JSON object
 void write(net.sf.json.JSONObject object, T data)
          Writes in the JSON object the POJO's data
 

Method Detail

getType

String getType()
The type name that appears in serialization

Returns:

getJavaType

Class<T> getJavaType()
The marshalled java type

Returns:

getReference

String getReference(T value)
Gets an input reference from the POJO object that can be fetched server side.

Parameters:
ref -
Returns:

read

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

Parameters:
json -
Returns:

write

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

Parameters:
o -
value -

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.