Package org.nuxeo.drive.service.impl
Class DefaultFileSystemItemFactory
java.lang.Object
org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory
- All Implemented Interfaces:
FileSystemItemFactory
public class DefaultFileSystemItemFactory
extends AbstractFileSystemItemFactory
implements FileSystemItemFactory
Default implementation of a
FileSystemItemFactory
. It is DocumentModel
backed and is the one used by
Nuxeo Drive.- Author:
- Antoine Taillefer
-
Field Summary
Fields inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected FileSystemItem
adaptDocument
(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo) Adapts the givenDocumentModel
to aFileSystemItem
.protected Blob
getBlob
(DocumentModel doc) void
handleParameters
(Map<String, String> parameters) Handles the factory parameters contributed through thefileSystemItemFactory
contribution.boolean
isFileSystemItem
(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) The default factory considers that aDocumentModel
is adaptable as aFileSystemItem
if: It is not a version AND it is not HiddenInNavigation AND it is not in the trash, unlessincludeDeleted
is true AND it is Folderish or it can be adapted as aBlobHolder
with a blob AND its blob is not backed by an extended blob provider AND it is not a synchronization root registered for the current user, unlessrelaxSyncRootConstraint
is trueMethods inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
adaptDocument, canHandleFileSystemItemId, exists, getDocumentById, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, parseFileSystemId, setName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.drive.service.FileSystemItemFactory
canHandleFileSystemItemId, exists, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, setName
-
Constructor Details
-
DefaultFileSystemItemFactory
public DefaultFileSystemItemFactory()
-
-
Method Details
-
handleParameters
Description copied from interface:FileSystemItemFactory
Handles the factory parameters contributed through thefileSystemItemFactory
contribution.- Specified by:
handleParameters
in interfaceFileSystemItemFactory
-
isFileSystemItem
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) The default factory considers that aDocumentModel
is adaptable as aFileSystemItem
if:- It is not a version
- AND it is not HiddenInNavigation
- AND it is not in the trash, unless
includeDeleted
is true - AND it is Folderish or it can be adapted as a
BlobHolder
with a blob - AND its blob is not backed by an extended blob provider
- AND it is not a synchronization root registered for the current user, unless
relaxSyncRootConstraint
is true
- Specified by:
isFileSystemItem
in interfaceFileSystemItemFactory
-
adaptDocument
protected FileSystemItem adaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo) Description copied from class:AbstractFileSystemItemFactory
Adapts the givenDocumentModel
to aFileSystemItem
. -
getBlob
-