Class ThumbnailJsonEnricher
java.lang.Object
org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter<Enriched<EntityType>>
org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher<DocumentModel>
org.nuxeo.ecm.platform.thumbnail.io.ThumbnailJsonEnricher
- All Implemented Interfaces:
Marshaller<Enriched<DocumentModel>>
,Writer<Enriched<DocumentModel>>
@Setup(mode=SINGLETON,
priority=2000)
public class ThumbnailJsonEnricher
extends AbstractJsonEnricher<DocumentModel>
Enrich
DocumentModel
Json.
Add DocumentModel
's thumbnail url as json attachment.
Enable if parameter enrichers-document=thumbnail is present.
Format is:
{
"entity-type":"document",
...
"contextParameters": {
"thumbnail": {
"url": "THUMBNAIL_URL"
},
}
}
- Since:
- 7.2
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected final boolean
static final String
static final String
static final String
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher
ENTITY_ENRICHER_NAME, MAPPER
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
ctx, registry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(com.fasterxml.jackson.core.JsonGenerator jg, DocumentModel document) When implementing this method, the providedJsonGenerator
expect you write a field name and a field value (or many).Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher
accept, safeReadBuffer, write
Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
getGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapField
-
Field Details
-
NAME
- See Also:
-
THUMBNAIL_URL_LABEL
- See Also:
-
SYNC_THUMBNAIL_RENDITION_PROP
- See Also:
-
sync
protected final boolean sync -
THUMBNAIL_URL_PATTERN
- See Also:
-
-
Constructor Details
-
ThumbnailJsonEnricher
public ThumbnailJsonEnricher()
-
-
Method Details
-
write
public void write(com.fasterxml.jackson.core.JsonGenerator jg, DocumentModel document) throws IOException Description copied from class:AbstractJsonEnricher
When implementing this method, the providedJsonGenerator
expect you write a field name and a field value (or many).- Specified by:
write
in classAbstractJsonEnricher<DocumentModel>
- Parameters:
jg
- TheJsonGenerator
to use.document
- The enriched entity.- Throws:
IOException
-