Class UserSyncRootParentFactory
- All Implemented Interfaces:
FileSystemItemFactory
,VirtualFolderItemFactory
FileSystemItemFactory
for the parent FolderItem
of the user's
synchronization roots.- 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
.getFileSystemItem
(DocumentModel doc, boolean includeDeleted) Force parent item usinggetTopLevelFolderItem(NuxeoPrincipal)
.getFileSystemItem
(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Gets theFileSystemItem
for the givenDocumentModel
.getFileSystemItem
(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo) Gets theFileSystemItem
for the givenDocumentModel
.protected FolderItem
getTopLevelFolderItem
(NuxeoPrincipal principal) 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, 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, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, setName
-
Field Details
-
FOLDER_NAME_PARAM
- See Also:
-
folderName
-
-
Constructor Details
-
UserSyncRootParentFactory
public UserSyncRootParentFactory()
-
-
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) 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
. -
getFileSystemItem
Force parent item usinggetTopLevelFolderItem(NuxeoPrincipal)
.- Specified by:
getFileSystemItem
in interfaceFileSystemItemFactory
- Overrides:
getFileSystemItem
in classAbstractFileSystemItemFactory
- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
-
getFileSystemItem
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Description copied from interface:FileSystemItemFactory
Gets theFileSystemItem
for the givenDocumentModel
.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 null.If
relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the current user.- Specified by:
getFileSystemItem
in interfaceFileSystemItemFactory
- Overrides:
getFileSystemItem
in classAbstractFileSystemItemFactory
- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
-
getFileSystemItem
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo) Description copied from interface:FileSystemItemFactory
Gets theFileSystemItem
for the givenDocumentModel
.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 null.If
relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the current user.If
getLockInfo
is true theLock
is fetched from theDocumentModel
and set on the returnedFileSystemItem
.- Specified by:
getFileSystemItem
in interfaceFileSystemItemFactory
- Overrides:
getFileSystemItem
in classAbstractFileSystemItemFactory
- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
-
getVirtualFolderItem
Description copied from interface:VirtualFolderItemFactory
Returns the (unique) virtualFolderItem
.- Specified by:
getVirtualFolderItem
in interfaceVirtualFolderItemFactory
-
getFolderName
- Specified by:
getFolderName
in interfaceVirtualFolderItemFactory
-
setFolderName
- Specified by:
setFolderName
in interfaceVirtualFolderItemFactory
-
getTopLevelFolderItem
-