public abstract class EntityListWriter<T> extends EntityWriter<List<T>>
getEntityType() and writeItem(JsonGenerator, Object)factory| Constructor and Description |
|---|
EntityListWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
getEntityType()
Returns the entity-type value of the list (ie: users, groups....)
|
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
protected void |
writeEntityBody(org.codehaus.jackson.JsonGenerator jg,
List<T> list)
Write the body of the entity.
|
protected void |
writeHeader(org.codehaus.jackson.JsonGenerator jg,
List<T> list)
Override this method to write into list header
|
protected abstract void |
writeItem(org.codehaus.jackson.JsonGenerator jg,
T item)
Writes the item in a JsonGenerator.
|
protected void |
writePaginableHeader(org.codehaus.jackson.JsonGenerator jg,
List<T> list) |
getSize, writeEntity, writeTopublic EntityListWriter()
protected abstract String getEntityType()
getEntityType in class EntityWriter<List<T>>protected abstract void writeItem(org.codehaus.jackson.JsonGenerator jg, T item) throws IOException
IOExceptionpublic boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<List<T>>isWriteable in class EntityWriter<List<T>>protected void writeEntityBody(org.codehaus.jackson.JsonGenerator jg, List<T> list) throws IOException
EntityWriterwriteEntityBody in class EntityWriter<List<T>>IOExceptionprotected void writePaginableHeader(org.codehaus.jackson.JsonGenerator jg, List<T> list) throws IOException
IOExceptionprotected void writeHeader(org.codehaus.jackson.JsonGenerator jg, List<T> list) throws IOException
IOExceptionCopyright © 2015 Nuxeo SA. All rights reserved.