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

BinaryMetadata - Add a parameter to make it optionally read-only

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.1
    • Fix Version/s: 10.10-HF53
    • Component/s: Binary Metadata
    • Release Notes Summary:
      A parameter is added to have mappings with read-only binary metadata.
    • Backlog priority:
      800
    • Upgrade notes:
      Hide

      By default, the MetadaMapping is a bidirectional: Values are read from the blob and stored in fields, and if the value of a mapped field is modified and the document is saved, the value is then written into the blob.

      This behavior is sometimes not desirable, so we added a new property to the extension point: readonly. If the value is readonly="true", then modifying a field will not modify the binary. Default value is « false » to preserve compatibility with existing configurations.

      Example:

      <extension target="org.nuxeo.binary.metadata"
                 point="metadataMappings">
        <!--  has the readOnly flag set to true, will not write to blob -->
        <metadataMapping id="PDF-ReadOnly" processor="exifTool" blobXPath="file:content"
                         ignorePrefix="false" readOnly="true">
          <metadata name="PDF:Language" xpath="dc:title"/>
        </metadataMapping>
        
        <!--  No readOnly flag: Plugin can write to blob -->
        <metadataMapping id="PDF-ReadWrite" processor="exifTool" blobXPath="file:content"
                         ignorePrefix="false">
          <metadata name="PDF:Producer" xpath="dc:source"/>
        </metadataMapping>
      </extension>
      
      Show
      By default, the MetadaMapping is a bidirectional: Values are read from the blob and stored in fields, and if the value of a mapped field is modified and the document is saved, the value is then written into the blob. This behavior is sometimes not desirable, so we added a new property to the extension point: readonly . If the value is readonly="true" , then modifying a field will not modify the binary. Default value is « false » to preserve compatibility with existing configurations. Example: <extension target= "org.nuxeo.binary.metadata" point= "metadataMappings" > <!-- has the readOnly flag set to true, will not write to blob --> <metadataMapping id= "PDF-ReadOnly" processor= "exifTool" blobXPath= "file:content" ignorePrefix= "false" readOnly= "true" > <metadata name= "PDF:Language" xpath= "dc:title" /> </metadataMapping> <!-- No readOnly flag: Plugin can write to blob --> <metadataMapping id= "PDF-ReadWrite" processor= "exifTool" blobXPath= "file:content" ignorePrefix= "false" > <metadata name= "PDF:Producer" xpath= "dc:source" /> </metadataMapping> </extension>
    • Sprint:
      nxplatform #43, nxplatform #44
    • Story Points:
      0

      Description

      metadataRules are always bidirectional. It could be useful to define a parameter that makes a rule read-only in order to prevent unnecessary binary updates or failed updates as exiftool provides only read support for several file types.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h