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(com.fasterxml.jackson.core.JsonGenerator jg,
               List<T> list)
Write the body of the entity. 
 | 
protected void | 
writeHeader(com.fasterxml.jackson.core.JsonGenerator jg,
           List<T> list)
Override this method to write into list header 
 | 
protected abstract void | 
writeItem(com.fasterxml.jackson.core.JsonGenerator jg,
         T item)
Writes the item in a JsonGenerator. 
 | 
protected void | 
writePaginableHeader(com.fasterxml.jackson.core.JsonGenerator jg,
                    List<T> list)  | 
getSize, writeEntity, writeTopublic EntityListWriter()
protected abstract String getEntityType()
getEntityType in class EntityWriter<List<T>>protected abstract void writeItem(com.fasterxml.jackson.core.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(com.fasterxml.jackson.core.JsonGenerator jg, List<T> list) throws IOException
EntityWriterwriteEntityBody in class EntityWriter<List<T>>IOExceptionprotected void writePaginableHeader(com.fasterxml.jackson.core.JsonGenerator jg, List<T> list) throws IOException
IOExceptionprotected void writeHeader(com.fasterxml.jackson.core.JsonGenerator jg, List<T> list) throws IOException
IOExceptionCopyright © 2019 Nuxeo. All rights reserved.