Platform Explorer / Nuxeo Platform LTS 2015 7.10

Component org.nuxeo.drive.service.FileSystemItemAdapterService

Implementation

Javadoc: org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl

Services

Extension points

Contributions

XML source

<?xml version="1.0"?>
<component name="org.nuxeo.drive.service.FileSystemItemAdapterService"
  version="1.0">

  <documentation>
    @author Antoine Taillefer (ataillefer@nuxeo.com)

    This service allows to get a FileSystemItem from a
    DocumentModel.

    FileSystemItem is an adapter that provides methods to
    get data from the document such as the binary content for a File
    or the children items of a Folder.

    It is used by Nuxeo Drive to fetch the needed data for synchronization.

    Factories can be contributed to implement a specific behavior
    for the FileSystemItem retrieval
    depending on the document type or facet.
  </documentation>

  <service>
    <provide interface="org.nuxeo.drive.service.FileSystemItemAdapterService" />
  </service>

  <implementation
    class="org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl" />

  <extension target="org.nuxeo.runtime.EventService" point="listeners">
    <listener
      class="org.nuxeo.drive.service.impl.FileSystemItemFactoryReloadListener">
      <topic>org.nuxeo.runtime.reload</topic>
    </listener>
  </extension>

  <extension-point name="fileSystemItemFactory">

    <documentation>
      @author Antoine Taillefer (ataillefer@nuxeo.com)

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

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

      Example of a FileSystemItem factory for documents with the Picture facet:
      <code>
        <extension
          target="org.nuxeo.drive.service.FileSystemItemAdapterService"
          point="fileSystemItemFactory">
          <fileSystemItemFactory name="picture" facet="Picture" order="100"
            class="org.nuxeo.drive.sample.PictureFileSystemItemFactory" />
         </extension>
      </code>

    </documentation>

    <object class="org.nuxeo.drive.service.impl.FileSystemItemFactoryDescriptor" />

  </extension-point>

  <extension-point name="topLevelFolderItemFactory">

    <documentation>
      @author Antoine Taillefer (ataillefer@nuxeo.com)

      This extension point lets you contribute the factory
      for the top level FolderItem.

      Example of the DefaultTopLevelFolderItemFactory:
      <code>
        <extension
          target="org.nuxeo.drive.service.FileSystemItemAdapterService"
          point="topLevelFolderItemFactory">
          <topLevelFolderItemFactory class="org.nuxeo.drive.service.impl.DefaultTopLevelFolderItemFactory" />
         </extension>
      </code>

    </documentation>

    <object class="org.nuxeo.drive.service.impl.TopLevelFolderItemFactoryDescriptor" />

  </extension-point>

  <extension-point name="activeFileSystemItemFactories">

    <documentation>
      @author Antoine Taillefer (ataillefer@nuxeo.com)

      This extension point lets you contribute the active FileSystemItem factories.

      Example of the default contribution:
      <code>
        <extension target="org.nuxeo.drive.service.FileSystemItemAdapterService"
          point="activeFileSystemItemFactories">
          <activeTopLevelFolderItemFactory>org.nuxeo.drive.service.impl.DefaultTopLevelFolderItemFactory
          </activeTopLevelFolderItemFactory>
          <activeFileSystemItemFactories>
            <factories>
              <factory>defaultSyncRootFolderItemFactory</factory>
              <factory>defaultFileSystemItemFactory</factory>
            </factories>
          </activeFileSystemItemFactories>
        </extension>
      </code>

      Example of a custom contribution:
      <code>
        <extension target="org.nuxeo.drive.service.FileSystemItemAdapterService"
          point="activeFileSystemItemFactories">
          <activeTopLevelFolderItemFactory>org.nuxeo.drive.hierarchy.userworkspace.factory.UserWorkspaceTopLevelFactory
          </activeTopLevelFolderItemFactory>
          <activeFileSystemItemFactories merge="true">
            <factories>
              <factory enabled="false">defaultSyncRootFolderItemFactory</factory>
              <factory>userWorkspaceSyncRootParentFactory</factory>
              <factory>userWorkspaceSyncRootFactory</factory>
            </factories>
          </activeFileSystemItemFactories>
        </extension>
      </code>

    </documentation>

    <object class="org.nuxeo.drive.service.impl.ActiveFileSystemItemFactoriesDescriptor" />
    <object class="org.nuxeo.drive.service.impl.ActiveTopLevelFolderItemFactoryDescriptor" />

  </extension-point>

</component>

Documentation

This service allows to get a FileSystemItem from a DocumentModel.

FileSystemItem is an adapter that provides methods to get data from the document such as the binary content for a File or the children items of a Folder.

It is used by Nuxeo Drive to fetch the needed data for synchronization.

Factories can be contributed to implement a specific behavior for the FileSystemItem retrieval depending on the document type or facet.