Class DocumentModelListJsonWriter
- java.lang.Object
-
- org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter<List<EntityType>>
-
- org.nuxeo.ecm.core.io.marshallers.json.DefaultListJsonWriter<DocumentModel>
-
- org.nuxeo.ecm.core.io.marshallers.json.document.DocumentModelListJsonWriter
-
- All Implemented Interfaces:
Marshaller<List<DocumentModel>>
,Writer<List<DocumentModel>>
@Setup(mode=SINGLETON, priority=2000) public class DocumentModelListJsonWriter extends DefaultListJsonWriter<DocumentModel>
- Since:
- 7.2
-
-
Field Summary
Fields Modifier and Type Field Description static String
ENTITY_DOCUMENT_LIST
-
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
ctx, registry
-
-
Constructor Summary
Constructors Constructor Description DocumentModelListJsonWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(List<DocumentModel> docs, com.fasterxml.jackson.core.JsonGenerator jg)
Implement this method to writes the entity in the providedJsonGenerator
.-
Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.DefaultListJsonWriter
extend
-
Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
accept, getGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapField
-
-
-
-
Field Detail
-
ENTITY_DOCUMENT_LIST
public static final String ENTITY_DOCUMENT_LIST
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DocumentModelListJsonWriter
public DocumentModelListJsonWriter()
-
-
Method Detail
-
write
public void write(List<DocumentModel> docs, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
Description copied from class:AbstractJsonWriter
Implement this method to writes the entity in the providedJsonGenerator
.This method implementation can use injected properties.
The
JsonGenerator
's flushing is done by this abstract class, it's also not not necessary to flush it. Do not close the providedJsonGenerator
. It may be used is another marshaller calling this one.- Overrides:
write
in classDefaultListJsonWriter<DocumentModel>
- Parameters:
docs
- The entity to marshall as Json.jg
- TheJsonGenerator
used to produce Json output.- Throws:
IOException
-
-