Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-26126

Make the "blob" enricher a BlobProperty enricher

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.3
    • Component/s: Rest API
    • Upgrade notes:
      Hide

      Enrichers can now apply to the blob type.

      For instance, to get the links to open a LiveConnect blob in all applications associated to its MIME type, you can use the enrichers-blob: appLinks enricher.
      Any blob property, e.g. file:content, will then be enriched in the following way:

      {
        "file:content": {
          "name": "...",
          "mime-type": "...",
          ...,
          "appLinks": [
            {
              "appName": "...",
              "icon": "...",
              "link": "..."
            },
            ...
          ]
        }
      }
      

      Note: since such a blob enricher applies to a BlobProperty, the backing class should extend AbstractJsonEnricher<BlobProperty> as in the example below:

      public class BlobAppLinksJsonEnricher extends AbstractJsonEnricher<BlobProperty> {
      
          @Override
          public void write(JsonGenerator jg, BlobProperty blobProperty) throws IOException {
              ...
          }
      }
      
      Show
      Enrichers can now apply to the blob type. For instance, to get the links to open a LiveConnect blob in all applications associated to its MIME type, you can use the enrichers-blob: appLinks enricher. Any blob property, e.g. file:content , will then be enriched in the following way: { "file:content" : { "name" : "..." , "mime-type" : "..." , ..., "appLinks" : [ { "appName" : "..." , "icon" : "..." , "link" : "..." }, ... ] } } Note: since such a blob enricher applies to a BlobProperty , the backing class should extend AbstractJsonEnricher<BlobProperty> as in the example below: public class BlobAppLinksJsonEnricher extends AbstractJsonEnricher<BlobProperty> { @Override public void write(JsonGenerator jg, BlobProperty blobProperty) throws IOException { ... } }
    • Sprint:
      nxfit 10.3.8
    • Story Points:
      2

      Description

      Following NXP-26002 "Introduce a pluggable blob marshaller" for NXP-26027 "Rework WOPI enricher", we found the need to retrieve the xpath form the enriched blob's property.

      We agreed that it makes more sense to have an enricher on a BlobProperty than on the Blob itself.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours
                  5h