Platform Explorer / Nuxeo Platform LTS 2015 7.10

Extension point fileSystemItemFactory

This extension point lets you contribute custom FileSystemItem factories according to a document type or facet.

Example of the DefaultFileSystemItemFactory:

    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
        <fileSystemItemFactory
            class="org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory"
            name="defaultFileSystemItemFactory" order="50">
            <parameters>
                <parameter name="versioningDelay">3600</parameter>
                <parameter name="versioningOption">MINOR</parameter>
            </parameters>
        </fileSystemItemFactory>
    </extension>

Example of a FileSystemItem factory for documents with the Picture facet:

    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
        <fileSystemItemFactory
            class="org.nuxeo.drive.sample.PictureFileSystemItemFactory"
            facet="Picture" name="picture" order="100"/>
    </extension>

Contribution Descriptor

Existing Contributions

  • nuxeo-drive-core-7.10-HF07.jar /OSGI-INF/nuxeodrive-hierarchy-permission-adapter-contrib.xml
    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
    
        <!-- User synchronization root parent factory (user workspace): order 
          before the "permissionSyncRootFactory" that has an order of 40 and before 
          the "defaultFileSystemItemFactory" that has an order of 50 -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.permission.factory.UserSyncRootParentFactory" name="userSyncRootParentFactory" order="30">
          <parameters>
            <parameter name="folderName">My Docs</parameter>
          </parameters>
        </fileSystemItemFactory>
    
        <!-- Synchronization root factory: order before the "defaultFileSystemItemFactory" 
          that has an order of 50 -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.permission.factory.PermissionSyncRootFactory" facet="DriveSynchronized" name="permissionSyncRootFactory" order="40">
          <parameters>
            <parameter name="requiredPermission">ReadWrite</parameter>
            <parameter name="userSyncRootParentFactory">userSyncRootParentFactory</parameter>
            <parameter name="sharedSyncRootParentFactory">
              sharedSyncRootParentFactory
            </parameter>
          </parameters>
        </fileSystemItemFactory>
    
        <!-- Shared synchronization root parent factory -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.permission.factory.SharedSyncRootParentFactory" name="sharedSyncRootParentFactory" order="100">
          <parameters>
            <parameter name="folderName">Other Docs</parameter>
          </parameters>
        </fileSystemItemFactory>
    
      </extension>
  • nuxeo-drive-core-7.10-HF07.jar /OSGI-INF/nuxeodrive-adapter-contrib.xml
    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
    
        <fileSystemItemFactory class="org.nuxeo.drive.service.impl.CollectionSyncRootFolderItemFactory" facet="Collection" name="collectionSyncRootFolderItemFactory" order="5"/>
        <fileSystemItemFactory class="org.nuxeo.drive.service.impl.DefaultSyncRootFolderItemFactory" facet="DriveSynchronized" name="defaultSyncRootFolderItemFactory" order="10"/>
        <fileSystemItemFactory class="org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory" name="defaultFileSystemItemFactory" order="50">
          <parameters>
            <parameter name="versioningDelay">3600</parameter>
            <parameter name="versioningOption">MINOR</parameter>
          </parameters>
        </fileSystemItemFactory>
    
      </extension>
  • nuxeo-drive-core-7.10-HF07.jar /OSGI-INF/nuxeodrive-hierarchy-userworkspace-adapter-contrib.xml
    <extension point="fileSystemItemFactory" target="org.nuxeo.drive.service.FileSystemItemAdapterService">
    
        <!-- Synchronization root parent factory: order before the "userWorkspaceSyncRootFactory" 
          that has an order of 40 and before the "defaultFileSystemItemFactory" that 
          has an order of 50 -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.userworkspace.factory.UserWorkspaceSyncRootParentFactory" name="userWorkspaceSyncRootParentFactory" order="30">
          <parameters>
            <parameter name="folderName">My synchronized folders</parameter>
          </parameters>
        </fileSystemItemFactory>
    
        <!-- Synchronization root factory: order before the "defaultFileSystemItemFactory" 
          that has an order of 50 -->
        <fileSystemItemFactory class="org.nuxeo.drive.hierarchy.userworkspace.factory.UserWorkspaceSyncRootFactory" facet="DriveSynchronized" name="userWorkspaceSyncRootFactory" order="40">
          <parameters>
            <parameter name="syncRootParentFactory">userWorkspaceSyncRootParentFactory
            </parameter>
          </parameters>
        </fileSystemItemFactory>
    
      </extension>