ccc.plugins.s11n.json
Class ResourceSerializer<T extends Resource>

java.lang.Object
  extended by ccc.plugins.s11n.json.ResSerializer<T>
      extended by ccc.plugins.s11n.json.ResourceSerializer<T>
All Implemented Interfaces:
Serializer<T>
Direct Known Subclasses:
AliasSerializer, FileSerializer, FolderSerializer, PageSerializer, TemplateSerializer, TempSerializer

public abstract class ResourceSerializer<T extends Resource>
extends ResSerializer<T>

Serializer for Resources.

Author:
Civic Computing Ltd.

Constructor Summary
ResourceSerializer()
           
 
Method Summary
 T read(Json json)
          Deserialize from a representation.
 Json write(Json json, T instance)
          Serialize to representation.
 
Methods inherited from class ccc.plugins.s11n.json.ResSerializer
createObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceSerializer

public ResourceSerializer()
Method Detail

read

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

Specified by:
read in interface Serializer<T extends Resource>
Overrides:
read in class ResSerializer<T extends Resource>
Parameters:
json - The wire representation.
Returns:
The corresponding object.

write

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

Specified by:
write in interface Serializer<T extends Resource>
Overrides:
write in class ResSerializer<T extends Resource>
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.