Platform Explorer / Nuxeo Platform LTS 2019 10.10

Extension point filters

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 Descriptor

Existing Contributions

  • nuxeo-platform-tag-core-10.10.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>
  • nuxeo-platform-collections-core-10.10.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-opencmis-impl-10.10.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-core-10.10.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="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-10.10.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>