Extension point filters
In component org.nuxeo.ecm.core.api.versioning.VersioningService
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.
-
<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>
-
<extension point="filters" target="org.nuxeo.ecm.core.api.versioning.VersioningService"> <filter id="versioning-delay"> <condition>#{currentDocument.dc.modified.time - previousDocument.dc.modified.time >= 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>
-
<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>
-
<extension point="filters" target="org.nuxeo.ecm.core.api.versioning.VersioningService"> <filter class="org.nuxeo.ecm.collections.core.versioning.NoVersioningCollectionPolicyFilter" id="collection-actions"/> </extension>