@Setup(mode=SINGLETON, priority=2000) public class PreviewJsonEnricher extends AbstractJsonEnricher<DocumentModel>
DocumentModel Json.
Add DocumentModel's preview url as json attachment.
Enable if parameter enrichers-document=preview is present.
Format is:
{
"entity-type":"document",
...
"contextParameters": {
"preview": {
"url": "PREVIEW_URL"
},
}
}
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
ENTITY_ENRICHER_NAMEctx, registry| Constructor and Description |
|---|
PreviewJsonEnricher() |
| Modifier and Type | Method and Description |
|---|---|
void |
write(com.fasterxml.jackson.core.JsonGenerator jg,
DocumentModel document)
When implementing this method, the provided
JsonGenerator expect you write a field name and a field value
(or many). |
accept, writegetGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapFieldpublic static final String NAME
public PreviewJsonEnricher()
public void write(com.fasterxml.jackson.core.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 © 2019 Nuxeo. All rights reserved.