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 useOutputable- 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectmakeSerializableObject(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.EntityProvider
getEntityPrefix
-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.capabilities.Outputable
getHandledOutputFormats
-
-
-
-
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 entityentity- an object of the type handled by your provider- Returns:
- the object you want to be serialized
-
-