Package org.nuxeo.drive.service.impl
Class AbstractSyncRootFolderItemFactory
- java.lang.Object
-
- org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
-
- org.nuxeo.drive.service.impl.AbstractSyncRootFolderItemFactory
-
- All Implemented Interfaces:
FileSystemItemFactory
- Direct Known Subclasses:
DefaultSyncRootFolderItemFactory
,PermissionSyncRootFactory
,UserWorkspaceSyncRootFactory
public abstract class AbstractSyncRootFolderItemFactory extends AbstractFileSystemItemFactory
BaseFileSystemItemFactory
for a synchronization rootFolderItem
.- Author:
- Antoine Taillefer
-
-
Field Summary
-
Fields inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
name
-
-
Constructor Summary
Constructors Constructor Description AbstractSyncRootFolderItemFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description FileSystemItem
getFileSystemItem(DocumentModel doc, boolean includeDeleted)
Force parent usinggetParentItem(DocumentModel)
.FileSystemItem
getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
Force parent usinggetParentItem(DocumentModel)
.FileSystemItem
getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
Force parent usinggetParentItem(DocumentModel)
.protected abstract FolderItem
getParentItem(DocumentModel doc)
Returns the parentFileSystemItem
.void
handleParameters(Map<String,String> parameters)
No parameters by default.boolean
isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
The 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, unlessincludeDeleted
is true AND it is a synchronization root registered for the current user, unlessrelaxSyncRootConstraint
is true-
Methods inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
adaptDocument, adaptDocument, canHandleFileSystemItemId, exists, getDocumentById, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, parseFileSystemId, setName
-
-
-
-
Constructor Detail
-
AbstractSyncRootFolderItemFactory
public AbstractSyncRootFolderItemFactory()
-
-
Method Detail
-
getParentItem
protected abstract FolderItem getParentItem(DocumentModel doc)
Returns the parentFileSystemItem
.
-
handleParameters
public void handleParameters(Map<String,String> parameters)
No parameters by default.
-
isFileSystemItem
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
The 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
-
getFileSystemItem
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted)
Force parent usinggetParentItem(DocumentModel)
.- Specified by:
getFileSystemItem
in interfaceFileSystemItemFactory
- Overrides:
getFileSystemItem
in classAbstractFileSystemItemFactory
- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
FileSystemItemFactory.isFileSystemItem(DocumentModel, boolean)
-
getFileSystemItem
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
Force parent usinggetParentItem(DocumentModel)
.- Specified by:
getFileSystemItem
in interfaceFileSystemItemFactory
- Overrides:
getFileSystemItem
in classAbstractFileSystemItemFactory
- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
FileSystemItemFactory.isFileSystemItem(DocumentModel, boolean, boolean)
-
getFileSystemItem
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
Force parent usinggetParentItem(DocumentModel)
.- Specified by:
getFileSystemItem
in interfaceFileSystemItemFactory
- Overrides:
getFileSystemItem
in classAbstractFileSystemItemFactory
- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
FileSystemItemFactory.isFileSystemItem(DocumentModel, boolean, boolean)
-
-