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

Ignore system-like schemas properties modifications (no listeners or versioning)

    XMLWordPrintable

    Details

      Description

      For example:
      When quota is installed, a facet is added to all documents to save quota-related metadata => the document is saved and a 'documentModified' is triggered.
      For now, we explicitly add some flags on the context data to disabled some of the built-in listeners:

      doc.putContextData(DISABLE_NOTIFICATION_SERVICE, true);
      doc.putContextData(DISABLE_DUBLINCORE_LISTENER, true);
      

      Also, a version might be created. A fix to prevent this was done with NXP-13725, but it works only if the default versioning rule allows "none" as an option.
      Custom listeners on 'documentModified' are also notified by default by the modifications done by the quotas.

      The UpdateThumbnailListener is another example:

            doc.putContextData(VersioningService.VERSIONING_OPTION,
                         VersioningOption.NONE);
                 doc.putContextData(VersioningService.DISABLE_AUTO_CHECKOUT,
                         Boolean.TRUE);
                 doc.putContextData(DublinCoreListener.DISABLE_DUBLINCORE_LISTENER,
                         Boolean.TRUE);
                 doc.putContextData(
                         NotificationConstants.DISABLE_NOTIFICATION_SERVICE,
                         Boolean.TRUE);
                 doc.putContextData("disableAuditLogger", Boolean.TRUE);
                 if (doc.isVersion()) {
                     doc.putContextData(ALLOW_VERSION_WRITE, Boolean.TRUE);
                 }
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: