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
public class PermissionSyncRootFactory extends AbstractSyncRootFolderItemFactory
Permission based implementation ofFileSystemItemFactoryfor a synchronization rootFolderItem.- Author:
- Antoine Taillefer
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringREQUIRED_PERMISSION_PARAMprotected StringrequiredPermissionprotected static StringSHARED_SYNC_ROOT_PARENT_FACTORY_PARAMprotected StringsharedSyncRootParentFactoryNameprotected static StringUSER_SYNC_ROOT_PARENT_FACTORY_PARAMprotected StringuserSyncRootParentFactoryName-
Fields inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
name
-
-
Constructor Summary
Constructors Constructor Description PermissionSyncRootFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FileSystemItemadaptDocument(DocumentModel doc, boolean forceParentId, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo)Adapts the givenDocumentModelto aFileSystemItem.protected FileSystemItemAdapterServicegetFileSystemAdapterService()protected FolderItemgetParentItem(DocumentModel doc)Returns 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, 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 Detail
-
REQUIRED_PERMISSION_PARAM
protected static final String REQUIRED_PERMISSION_PARAM
- See Also:
- Constant Field Values
-
USER_SYNC_ROOT_PARENT_FACTORY_PARAM
protected static final String USER_SYNC_ROOT_PARENT_FACTORY_PARAM
- See Also:
- Constant Field Values
-
SHARED_SYNC_ROOT_PARENT_FACTORY_PARAM
protected static final String SHARED_SYNC_ROOT_PARENT_FACTORY_PARAM
- See Also:
- Constant Field Values
-
requiredPermission
protected String requiredPermission
-
userSyncRootParentFactoryName
protected String userSyncRootParentFactoryName
-
sharedSyncRootParentFactoryName
protected String sharedSyncRootParentFactoryName
-
-
Method Detail
-
handleParameters
public void handleParameters(Map<String,String> parameters)
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.
-
getParentItem
protected FolderItem getParentItem(DocumentModel doc)
Description copied from class:AbstractSyncRootFolderItemFactoryReturns the parentFileSystemItem.- Specified by:
getParentItemin classAbstractSyncRootFolderItemFactory
-
getFileSystemAdapterService
protected FileSystemItemAdapterService getFileSystemAdapterService()
-
-