org.sakaiproject.entitybroker.entityprovider.capabilities
Interface OutputSerializable

All Superinterfaces:
EntityProvider, Formats, Outputable

public interface OutputSerializable
extends Outputable

Allows this entity to better control the data that is going to be output by allowing it to intercept the entities and return them as whatever objects which should be serialized for output, if you just want to use the internal methods to handle formatting the output then simply use Outputable

Author:
Aaron Zeckoski (aaron@caret.cam.ac.uk)

Field Summary
 
Fields inherited from interface org.sakaiproject.entitybroker.entityprovider.extension.Formats
ALL_KNOWN_FORMATS, ATOM, ATOM_EXTENSIONS, ATOM_MIME_TYPE, FORM, FORM_EXTENSIONS, FORM_MIME_TYPE, HTML, HTML_EXTENSIONS, HTML_MIME_TYPE, JSON, JSON_EXTENSIONS, JSON_MIME_TYPE, JSONP, JSONP_EXTENSIONS, JSONP_MIME_TYPE, RSS, RSS_EXTENSIONS, RSS_MIME_TYPE, TXT, TXT_EXTENSIONS, TXT_MIME_TYPE, UTF_8, XML, XML_EXTENSIONS, XML_MIME_TYPE
 
Method Summary
 Object makeSerializableObject(EntityReference ref, Object entity)
          Take the entity and convert it to whatever objects (Map, List, String, etc.) that you want to output, this will be called every time that an entity is about to serialized but only if the type of object matches that of the entities handled by your provider
 
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.Outputable
getHandledOutputFormats
 
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.EntityProvider
getEntityPrefix
 

Method Detail

makeSerializableObject

Object makeSerializableObject(EntityReference ref,
                              Object entity)
Take the entity and convert it to whatever objects (Map, List, String, etc.) that you want to output, this will be called every time that an entity is about to serialized but only if the type of object matches that of the entities handled by your provider

Parameters:
the - entity reference for the current entity
entity - an object of the type handled by your provider
Returns:
the object you want to be serialized


Copyright © 2007-2012 Sakai Project. All Rights Reserved.