Class 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 Details

  • 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: AbstractJsonEnricher
      When implementing this method, the provided JsonGenerator expect you write a field name and a field value (or many).
      Specified by:
      write in class AbstractJsonEnricher<BlobProperty>
      Parameters:
      jg - The JsonGenerator to use.
      blobProperty - The enriched entity.
      Throws:
      IOException