ccc.plugins.s11n.json
Class PageSerializer

java.lang.Object
  extended by ccc.plugins.s11n.json.ResSerializer<T>
      extended by ccc.plugins.s11n.json.ResourceSerializer<Page>
          extended by ccc.plugins.s11n.json.PageSerializer
All Implemented Interfaces:
Serializer<Page>

public class PageSerializer
extends ResourceSerializer<Page>

Serializer for Resources.

Author:
Civic Computing Ltd.

Constructor Summary
PageSerializer()
           
 
Method Summary
protected  Page createObject()
          Create a new instance of type T.
 Page read(Json json)
          Deserialize from a representation.
 Json write(Json json, Page instance)
          Serialize to representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageSerializer

public PageSerializer()
Method Detail

read

public Page read(Json json)
Deserialize from a representation.

Specified by:
read in interface Serializer<Page>
Overrides:
read in class ResourceSerializer<Page>
Parameters:
json - The wire representation.
Returns:
The corresponding object.

createObject

protected Page createObject()
Create a new instance of type T.

Specified by:
createObject in class ResSerializer<Page>
Returns:
The newly created instance of T.

write

public Json write(Json json,
                  Page instance)
Serialize to representation.

Specified by:
write in interface Serializer<Page>
Overrides:
write in class ResourceSerializer<Page>
Parameters:
json - The wire representation.
instance - The object to serialize.
Returns:
Returns the 'json' input param if the 'instance' param is not NULL; returns NULL otherwise.


Copyright © 2010. All Rights Reserved.