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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected 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 forceParentId, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo) Adapts the givenDocumentModelto aFileSystemItem.protected FileSystemItemAdapterServiceprotected FolderItemReturns the parentFileSystemItem.voidhandleParameters(Map<String, String> parameters) No parameters by default.booleanisFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Checks if the givenDocumentModelis adaptable as aFileSystemItem.Methods inherited from class org.nuxeo.drive.service.impl.AbstractSyncRootFolderItemFactory
getFileSystemItem, getFileSystemItem, getFileSystemItemMethods 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:AbstractSyncRootFolderItemFactoryNo parameters by default.- Specified by:
handleParametersin interfaceFileSystemItemFactory- Overrides:
handleParametersin classAbstractSyncRootFolderItemFactory
-
isFileSystemItem
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Checks if the givenDocumentModelis adaptable as aFileSystemItem. The permission synchronization root factory considers that aDocumentModelis adaptable as aFileSystemItemif:- 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
includeDeletedis true - AND it is a synchronization root registered for the current user, unless
relaxSyncRootConstraintis true - AND the current user has the
requiredPermissionpermission on the document
- Specified by:
isFileSystemItemin interfaceFileSystemItemFactory- Overrides:
isFileSystemItemin classAbstractSyncRootFolderItemFactory
-
adaptDocument
protected FileSystemItem adaptDocument(DocumentModel doc, boolean forceParentId, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo) Description copied from class:AbstractFileSystemItemFactoryAdapts the givenDocumentModelto aFileSystemItem.- Specified by:
adaptDocumentin classAbstractFileSystemItemFactory- See Also:
-
getParentItem
Description copied from class:AbstractSyncRootFolderItemFactoryReturns the parentFileSystemItem.- Specified by:
getParentItemin classAbstractSyncRootFolderItemFactory
-
getFileSystemAdapterService
-