Platform Explorer / Nuxeo Platform 2023.19

Extension point filters

Documentation

Extension point defining filters which can be used by one or multiple versioning policies. Contributions to this extension point are available for VersioningService implementing ExtendableVersioningService interface.

Example :

    <filter class="foo.bar.CustomVersioningFilter" id="class-filter"/>
    <filter id="collaborative-filter-on-files">
        <type>File</type>
        <condition>#{previousDocument.dc.lastContributor != currentDocument.dc.lastContributor}</condition>
    </filter>
    <filter id="empty">
        <type/>
        <facet/>
        <schema/>
        <condition/>
    </filter>

A custom filter can be defined with the class attribute if a java class should be used for the filter. Otherwise, a StandardVersioningFilter will be used with the following elements available:

- The type element defines which document type will be versioned.

- The facet/schema element defines that the document will be versioned if it contains the facet/schema.

- The condition element enables creating a custom condition with an EL expression.

Note that elements for a filter are AND-ed.

@since 9.1

Contribution Descriptors

  • Class: org.nuxeo.ecm.core.versioning.VersioningFilterDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-core-2023.19.6.jar /OSGI-INF/versioning-default-policies.xml
    <extension point="filters" target="org.nuxeo.ecm.core.api.versioning.VersioningService">
        <filter class="org.nuxeo.ecm.core.versioning.NoVersioningPolicyFilter" id="system-document"/>
        <filter id="disable-versioning">
          <condition>#{currentDocument.contextData.DisableAutomaticVersioning}</condition>
        </filter>
        <filter id="note-filter">
          <type>Note</type>
        </filter>
        <filter id="last-contributor-different-filter">
          <schema>file</schema>
          <condition>#{previousDocument.dc.lastContributor != currentDocument.dc.lastContributor}</condition>
        </filter>
      </extension>
  • nuxeo-drive-core-2023.19.6.jar /OSGI-INF/nuxeodrive-versioning-policy-contrib.xml
    <extension point="filters" target="org.nuxeo.ecm.core.api.versioning.VersioningService">
        <filter id="versioning-delay">
          <condition>#{currentDocument.dc.modified.time - previousDocument.dc.modified.time &gt;= 3600000}</condition>
        </filter>
        <filter id="drive-filter">
          <condition>#{currentDocument.contextData.source == "drive"}</condition>
        </filter>
        <filter id="not-drive-filter">
          <condition>#{currentDocument.contextData.source != "drive"}</condition>
        </filter>
        <filter id="not-folderish">
          <condition>#{!currentDocument.folder}</condition>
        </filter>
      </extension>
  • nuxeo-opencmis-impl-2023.19.6.jar /OSGI-INF/cmis-versioning-contrib.xml
    <extension point="filters" target="org.nuxeo.ecm.core.api.versioning.VersioningService">
        <filter class="org.nuxeo.ecm.core.opencmis.impl.server.versioning.CMISVersioningFilter" id="cmis-document"/>
      </extension>
  • nuxeo-platform-collections-core-2023.19.6.jar /OSGI-INF/collection-versioning-contrib.xml
    <extension point="filters" target="org.nuxeo.ecm.core.api.versioning.VersioningService">
        <filter class="org.nuxeo.ecm.collections.core.versioning.NoVersioningCollectionPolicyFilter" id="collection-actions"/>
      </extension>
  • nuxeo-platform-tag-2023.19.6.jar /OSGI-INF/faceted-tag-versioning-policy.xml
    <extension point="filters" target="org.nuxeo.ecm.core.api.versioning.VersioningService">
        <filter class="org.nuxeo.ecm.platform.tag.NoVersioningFacetedTagFilter" id="no-versioning-faceted-tag-filter"/>
      </extension>