Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.automation.server.jaxrs.io.marshallers
Class DateMarshaller

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

public class DateMarshaller
extends Object
implements JsonMarshaller<Date>

Author:
matic

Constructor Summary
DateMarshaller()
           
 
Method Summary
 Class<Date> getJavaType()
          The marshalled java type
 String getType()
          The type name that appears in json content
 String newReference(Date value)
          Returns a server reference to a POJO object
 Date read(net.sf.json.JSONObject json)
          Builds and returns a POJO from the JSON object
 Date resolveReference(String ref)
          Resolve a reference and returns the POJO object
 void write(net.sf.json.JSONObject json, Object date)
          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

DateMarshaller

public DateMarshaller()
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<Date>
Returns:

getJavaType

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

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

resolveReference

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

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

newReference

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

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

read

public Date 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<Date>
Returns:

write

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

Specified by:
write in interface JsonMarshaller<Date>

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.