Class EntityListWriter<T>
- java.lang.Object
- 
- org.nuxeo.ecm.automation.jaxrs.io.EntityWriter<List<T>>
- 
- org.nuxeo.ecm.automation.jaxrs.io.EntityListWriter<T>
 
 
- 
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyWriter<List<T>>
 - Direct Known Subclasses:
- BusinessAdapterListWriter,- LogEntryListWriter
 
 public abstract class EntityListWriter<T> extends EntityWriter<List<T>> Abstract class that knows how to serialize List of nuxeo entities. The implementing classes should only implementgetEntityType()andwriteItem(JsonGenerator, Object)- Since:
- 5.7.3
 
- 
- 
Field Summary- 
Fields inherited from class org.nuxeo.ecm.automation.jaxrs.io.EntityWriterfactory
 
- 
 - 
Constructor SummaryConstructors Constructor Description EntityListWriter()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringgetEntityType()Returns the entity-type value of the list (ie: users, groups....)booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)protected voidwriteEntityBody(com.fasterxml.jackson.core.JsonGenerator jg, List<T> list)Write the body of the entity.protected voidwriteHeader(com.fasterxml.jackson.core.JsonGenerator jg, List<T> list)Override this method to write into list headerprotected abstract voidwriteItem(com.fasterxml.jackson.core.JsonGenerator jg, T item)Writes the item in a JsonGenerator.protected voidwritePaginableHeader(com.fasterxml.jackson.core.JsonGenerator jg, List<T> list)- 
Methods inherited from class org.nuxeo.ecm.automation.jaxrs.io.EntityWritergetSize, writeEntity, writeTo
 
- 
 
- 
- 
- 
Method Detail- 
getEntityTypeprotected abstract String getEntityType() Returns the entity-type value of the list (ie: users, groups....)- Specified by:
- getEntityTypein class- EntityWriter<List<T>>
- Returns:
- the string representing the entity-type.
 
 - 
writeItemprotected abstract void writeItem(com.fasterxml.jackson.core.JsonGenerator jg, T item) throws IOExceptionWrites the item in a JsonGenerator.- Throws:
- IOException
 
 - 
isWriteablepublic boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
- isWriteablein interface- javax.ws.rs.ext.MessageBodyWriter<T>
- Overrides:
- isWriteablein class- EntityWriter<List<T>>
 
 - 
writeEntityBodyprotected void writeEntityBody(com.fasterxml.jackson.core.JsonGenerator jg, List<T> list) throws IOExceptionDescription copied from class:EntityWriterWrite the body of the entity. The object has already been opened and it entity-type rendered.- Specified by:
- writeEntityBodyin class- EntityWriter<List<T>>
- Throws:
- IOException
 
 - 
writePaginableHeaderprotected void writePaginableHeader(com.fasterxml.jackson.core.JsonGenerator jg, List<T> list) throws IOException- Throws:
- IOException
 
 - 
writeHeaderprotected void writeHeader(com.fasterxml.jackson.core.JsonGenerator jg, List<T> list) throws IOExceptionOverride this method to write into list header- Throws:
- IOException
 
 
- 
 
-