Class PermissionSyncRootFactory
java.lang.Object
org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
org.nuxeo.drive.service.impl.AbstractSyncRootFolderItemFactory
org.nuxeo.drive.hierarchy.permission.factory.PermissionSyncRootFactory
- All Implemented Interfaces:
FileSystemItemFactory
Permission based implementation of
FileSystemItemFactory
for a synchronization root FolderItem
.- Author:
- Antoine Taillefer
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected String
protected static final String
protected String
protected static final String
protected String
Fields inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected FileSystemItem
adaptDocument
(DocumentModel doc, boolean forceParentId, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo) Adapts the givenDocumentModel
to aFileSystemItem
.protected FileSystemItemAdapterService
protected FolderItem
Returns the parentFileSystemItem
.void
handleParameters
(Map<String, String> parameters) No parameters by default.boolean
isFileSystemItem
(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Checks if the givenDocumentModel
is adaptable as aFileSystemItem
.Methods inherited from class org.nuxeo.drive.service.impl.AbstractSyncRootFolderItemFactory
getFileSystemItem, getFileSystemItem, getFileSystemItem
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
-
Field Details
-
REQUIRED_PERMISSION_PARAM
- See Also:
-
USER_SYNC_ROOT_PARENT_FACTORY_PARAM
- See Also:
-
SHARED_SYNC_ROOT_PARENT_FACTORY_PARAM
- See Also:
-
requiredPermission
-
userSyncRootParentFactoryName
-
-
Constructor Details
-
PermissionSyncRootFactory
public PermissionSyncRootFactory()
-
-
Method Details
-
handleParameters
Description copied from class:AbstractSyncRootFolderItemFactory
No parameters by default.- Specified by:
handleParameters
in interfaceFileSystemItemFactory
- Overrides:
handleParameters
in classAbstractSyncRootFolderItemFactory
-
isFileSystemItem
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Checks if the givenDocumentModel
is adaptable as aFileSystemItem
. The permission synchronization root factory considers that aDocumentModel
is adaptable as aFileSystemItem
if:- It is Folderish
- AND it is not a version nor a proxy
- AND it is not HiddenInNavigation
- AND it is not in the trash, unless
includeDeleted
is true - AND it is a synchronization root registered for the current user, unless
relaxSyncRootConstraint
is true - AND the current user has the
requiredPermission
permission on the document
- Specified by:
isFileSystemItem
in interfaceFileSystemItemFactory
- Overrides:
isFileSystemItem
in classAbstractSyncRootFolderItemFactory
-
adaptDocument
protected FileSystemItem adaptDocument(DocumentModel doc, boolean forceParentId, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo) Description copied from class:AbstractFileSystemItemFactory
Adapts the givenDocumentModel
to aFileSystemItem
. -
getParentItem
Description copied from class:AbstractSyncRootFolderItemFactory
Returns the parentFileSystemItem
.- Specified by:
getParentItem
in classAbstractSyncRootFolderItemFactory
-
getFileSystemAdapterService
-