@Setup(mode=SINGLETON, priority=2000) public class ChildrenJsonEnricher extends AbstractJsonEnricher<DocumentModel>
DocumentModel Json.
Add document children (list of document) as json attachment.
Enable if parameter enrichers.document=children is present.
Format is:
{
"entity-type":"document",
...
"contextParameters": {
"children": { see {@link DocumentModelListJsonWriter} for format }
}
}
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
ENTITY_ENRICHER_NAME| Constructor and Description |
|---|
ChildrenJsonEnricher() |
| Modifier and Type | Method and Description |
|---|---|
void |
write(org.codehaus.jackson.JsonGenerator jg,
DocumentModel document)
When implementing this method, the provided
JsonGenerator expect you write a field name and a field value
(or many). |
accept, writewritepublic static final String NAME
public void write(org.codehaus.jackson.JsonGenerator jg,
DocumentModel document)
throws IOException
AbstractJsonEnricherJsonGenerator expect you write a field name and a field value
(or many).write in class AbstractJsonEnricher<DocumentModel>jg - The JsonGenerator to use.document - The enriched entity.IOExceptionCopyright © 2015 Nuxeo SA. All rights reserved.