Class UserWorkspaceTopLevelFactory
java.lang.Object
org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
org.nuxeo.drive.hierarchy.userworkspace.factory.UserWorkspaceTopLevelFactory
- All Implemented Interfaces:
FileSystemItemFactory,TopLevelFolderItemFactory,VirtualFolderItemFactory
public class UserWorkspaceTopLevelFactory
extends AbstractFileSystemItemFactory
implements TopLevelFolderItemFactory
User workspace based implementation of the
TopLevelFolderItemFactory.- Author:
- Antoine Taillefer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected Stringprotected static final Stringprotected StringFields inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FileSystemItemadaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo) Adapts the givenDocumentModelto aFileSystemItem.getTopLevelFolderItem(NuxeoPrincipal principal) getVirtualFolderItem(NuxeoPrincipal principal) Returns the (unique) virtualFolderItem.voidhandleParameters(Map<String, String> parameters) Handles the factory parameters contributed through thefileSystemItemFactorycontribution.booleanisFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Returns true if the givenDocumentModelis adaptable as aFileSystemItem.voidsetFolderName(String folderName) Methods 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, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.drive.service.FileSystemItemFactory
canHandleFileSystemItemId, exists, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, setName
-
Field Details
-
FOLDER_NAME_PARAM
- See Also:
-
SYNC_ROOT_PARENT_FACTORY_PARAM
- See Also:
-
DEFAULT_FOLDER_NAME
- See Also:
-
folderName
-
syncRootParentFactoryName
-
-
Constructor Details
-
UserWorkspaceTopLevelFactory
public UserWorkspaceTopLevelFactory()
-
-
Method Details
-
handleParameters
Description copied from interface:FileSystemItemFactoryHandles the factory parameters contributed through thefileSystemItemFactorycontribution.- Specified by:
handleParametersin interfaceFileSystemItemFactory
-
isFileSystemItem
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Description copied from interface:FileSystemItemFactoryReturns true if the givenDocumentModelis adaptable as aFileSystemItem.If
includeDeletedis true no filter is applied on the "trashed" state, else if the document is in this state it is not considered as adaptable as aFileSystemItem, thus the method returns false.If
relaxSyncRootConstraintis true no filter is applied on the synchronization root aspect for the current user.- Specified by:
isFileSystemItemin interfaceFileSystemItemFactory
-
adaptDocument
protected FileSystemItem adaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo) Description copied from class:AbstractFileSystemItemFactoryAdapts the givenDocumentModelto aFileSystemItem.- Specified by:
adaptDocumentin classAbstractFileSystemItemFactory- See Also:
-
getVirtualFolderItem
Description copied from interface:VirtualFolderItemFactoryReturns the (unique) virtualFolderItem.- Specified by:
getVirtualFolderItemin interfaceVirtualFolderItemFactory
-
getFolderName
- Specified by:
getFolderNamein interfaceVirtualFolderItemFactory
-
setFolderName
- Specified by:
setFolderNamein interfaceVirtualFolderItemFactory
-
getTopLevelFolderItem
- Specified by:
getTopLevelFolderItemin interfaceTopLevelFolderItemFactory
-