@Setup(mode=SINGLETON, priority=2000) public class DocumentUrlJsonEnricher extends AbstractJsonEnricher<DocumentModel>
DocumentModel
Json.
Add DocumentModel
's document url as json attachment.
Enable if parameter enrichers-document=documentURL is present.
Format is:
{ "entity-type":"document", ... "contextParameters": { "documentURL": "DOCUMENT_URL" } }
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
static String |
NOTIFICATION_DOCUMENT_ID_CODEC_NAME |
ENTITY_ENRICHER_NAME
ctx, registry
Constructor and Description |
---|
DocumentUrlJsonEnricher() |
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, write
getGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapField
public static final String NAME
public static final String NOTIFICATION_DOCUMENT_ID_CODEC_NAME
public DocumentUrlJsonEnricher()
public void write(com.fasterxml.jackson.core.JsonGenerator jg, DocumentModel document) throws IOException
AbstractJsonEnricher
JsonGenerator
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.IOException
Copyright © 2018 Nuxeo. All rights reserved.