@Setup(mode=SINGLETON, priority=2000) public class SampleDocumentEnricher extends AbstractJsonEnricher<DocumentModel>
nuxeo.ecm.core.api.DocumentModel Json.
Format is:
{
...
"contextParameters": {
"sample_document": { ... }
}
}
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
ENTITY_ENRICHER_NAMEctx, registry| Constructor and Description |
|---|
SampleDocumentEnricher() |
| Modifier and Type | Method and Description |
|---|---|
void |
write(org.codehaus.jackson.JsonGenerator jg,
DocumentModel obj)
When implementing this method, the provided
JsonGenerator expect you write a field name and a field value
(or many). |
accept, writegetGenerator, write, writeEntity, writeEntity, writeEntityFieldpublic static final String NAME
public SampleDocumentEnricher()
public void write(org.codehaus.jackson.JsonGenerator jg, DocumentModel obj) 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.obj - The enriched entity.IOExceptionCopyright © 2018 Nuxeo. All rights reserved.