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 theTopLevelFolderItemFactory
.- Author:
- Antoine Taillefer
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
DEFAULT_FOLDER_NAME
protected static String
FOLDER_NAME_PARAM
protected String
folderName
protected static String
SYNC_ROOT_PARENT_FACTORY_PARAM
protected String
syncRootParentFactoryName
-
Fields inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
name
-
-
Constructor Summary
Constructors Constructor Description UserWorkspaceTopLevelFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FileSystemItem
adaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo)
Adapts the givenDocumentModel
to aFileSystemItem
.String
getFolderName()
FolderItem
getTopLevelFolderItem(NuxeoPrincipal principal)
FolderItem
getVirtualFolderItem(NuxeoPrincipal principal)
Returns the (unique) virtualFolderItem
.void
handleParameters(Map<String,String> parameters)
Handles the factory parameters contributed through thefileSystemItemFactory
contribution.boolean
isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
Returns true if the givenDocumentModel
is adaptable as aFileSystemItem
.void
setFolderName(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, 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
-
-
-
-
Field Detail
-
FOLDER_NAME_PARAM
protected static final String FOLDER_NAME_PARAM
- See Also:
- Constant Field Values
-
SYNC_ROOT_PARENT_FACTORY_PARAM
protected static final String SYNC_ROOT_PARENT_FACTORY_PARAM
- See Also:
- Constant Field Values
-
DEFAULT_FOLDER_NAME
protected static final String DEFAULT_FOLDER_NAME
- See Also:
- Constant Field Values
-
folderName
protected String folderName
-
syncRootParentFactoryName
protected String syncRootParentFactoryName
-
-
Method Detail
-
handleParameters
public void handleParameters(Map<String,String> parameters)
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)
Description copied from interface:FileSystemItemFactory
Returns true if the givenDocumentModel
is adaptable as aFileSystemItem
.If
includeDeleted
is 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
relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the current user.- 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
.
-
getVirtualFolderItem
public FolderItem getVirtualFolderItem(NuxeoPrincipal principal)
Description copied from interface:VirtualFolderItemFactory
Returns the (unique) virtualFolderItem
.- Specified by:
getVirtualFolderItem
in interfaceVirtualFolderItemFactory
-
getFolderName
public String getFolderName()
- Specified by:
getFolderName
in interfaceVirtualFolderItemFactory
-
setFolderName
public void setFolderName(String folderName)
- Specified by:
setFolderName
in interfaceVirtualFolderItemFactory
-
getTopLevelFolderItem
public FolderItem getTopLevelFolderItem(NuxeoPrincipal principal)
- Specified by:
getTopLevelFolderItem
in interfaceTopLevelFolderItemFactory
-
-