Class BlobPreviewJsonEnricher
java.lang.Object
org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter<Enriched<BlobProperty>>
org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher<BlobProperty>
org.nuxeo.ecm.platform.preview.io.BlobPreviewJsonEnricher
- All Implemented Interfaces:
Marshaller<Enriched<BlobProperty>>,Writer<Enriched<BlobProperty>>
@Setup(mode=SINGLETON,
priority=2000)
public class BlobPreviewJsonEnricher
extends AbstractJsonEnricher<BlobProperty>
Enriches
Blob json with embed preview link when available.
Enabled when parameter enrichers-blob=preview is present.
Blob format is:
{
"name": "...",
"mime-type": "...",
...
"preview": "<url>"
}
- Since:
- 11.2
-
Field Summary
FieldsFields inherited from class org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher
ENTITY_ENRICHER_NAME, MAPPERFields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
ctx, registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(com.fasterxml.jackson.core.JsonGenerator jg, BlobProperty blobProperty) When implementing this method, the providedJsonGeneratorexpect 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, writeMethods 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:
-
-
Constructor Details
-
BlobPreviewJsonEnricher
public BlobPreviewJsonEnricher()
-
-
Method Details
-
write
public void write(com.fasterxml.jackson.core.JsonGenerator jg, BlobProperty blobProperty) throws IOException Description copied from class:AbstractJsonEnricherWhen implementing this method, the providedJsonGeneratorexpect you write a field name and a field value (or many).- Specified by:
writein classAbstractJsonEnricher<BlobProperty>- Parameters:
jg- TheJsonGeneratorto use.blobProperty- The enriched entity.- Throws:
IOException
-