Package org.nuxeo.drive.adapter.impl
Class AbstractVirtualFolderItem
java.lang.Object
org.nuxeo.drive.adapter.impl.AbstractFileSystemItem
org.nuxeo.drive.adapter.impl.AbstractVirtualFolderItem
- All Implemented Interfaces:
Comparable<FileSystemItem>
,FileSystemItem
,FolderItem
- Direct Known Subclasses:
DefaultTopLevelFolderItem
,PermissionTopLevelFolderItem
,SharedSyncRootParentFolderItem
,UserWorkspaceSyncRootParentFolderItem
public abstract class AbstractVirtualFolderItem
extends AbstractFileSystemItem
implements FolderItem
Base implementation of a virtual
FolderItem
.- Author:
- Antoine Taillefer
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
Fields inherited from class org.nuxeo.drive.adapter.impl.AbstractFileSystemItem
canDelete, canRename, creationDate, creator, factoryName, FILE_SYSTEM_ITEM_ID_SEPARATOR, FILE_SYSTEM_ITEM_PATH_SEPARATOR, folder, id, lastContributor, lastModificationDate, lockInfo, name, parentId, path, principal, userName
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractVirtualFolderItem
(String factoryName, NuxeoPrincipal principal, String parentId, String parentPath, String folderName) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canMove
(FolderItem dest) createFile
(Blob blob, boolean overwrite) createFolder
(String name, boolean overwrite) void
delete()
boolean
boolean
boolean
Returnstrue
if theFolderItem.scrollDescendants(String, int, long)
API can be used.int
hashCode()
move
(FolderItem dest) void
scrollDescendants
(String scrollId, int batchSize, long keepAlive) protected void
setCanCreateChild
(boolean canCreateChild) protected void
setCanScrollDescendants
(boolean canScrollDescendants) Methods inherited from class org.nuxeo.drive.adapter.impl.AbstractFileSystemItem
compareTo, getCanDelete, getCanRename, getCreationDate, getCreator, getFileSystemItemAdapterService, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, getUserName, isFolder, setCanDelete, setCanRename, setCreationDate, setCreator, setFolder, setId, setLastContributor, setLastModificationDate, setLockInfo, setName, setParentId, setPath, setUserName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.nuxeo.drive.adapter.FileSystemItem
getCanDelete, getCanRename, getCreationDate, getCreator, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, isFolder
Methods inherited from interface org.nuxeo.drive.adapter.FolderItem
getChildren
-
Field Details
-
canCreateChild
protected boolean canCreateChild -
canScrollDescendants
protected boolean canScrollDescendants
-
-
Constructor Details
-
AbstractVirtualFolderItem
public AbstractVirtualFolderItem(String factoryName, NuxeoPrincipal principal, String parentId, String parentPath, String folderName) -
AbstractVirtualFolderItem
protected AbstractVirtualFolderItem()
-
-
Method Details
-
rename
- Specified by:
rename
in interfaceFileSystemItem
-
delete
public void delete()- Specified by:
delete
in interfaceFileSystemItem
-
canMove
- Specified by:
canMove
in interfaceFileSystemItem
-
move
- Specified by:
move
in interfaceFileSystemItem
-
getCanScrollDescendants
public boolean getCanScrollDescendants()Description copied from interface:FolderItem
Returnstrue
if theFolderItem.scrollDescendants(String, int, long)
API can be used.- Specified by:
getCanScrollDescendants
in interfaceFolderItem
-
scrollDescendants
Description copied from interface:FolderItem
Retrieves at mostbatchSize
FileSystemItem
descendants for the givenscrollId
.When passing a null
scrollId
the initial search request is executed and the first batch of results is returned along with ascrollId
which should be passed to the next call in order to retrieve the next batch of results.Ideally, the search context made available by the initial search request is kept alive during
keepAlive
milliseconds ifkeepAlive
is positive.Results are not necessarily sorted.
This method is protected by a
Semaphore
, made available byFileSystemItemAdapterService.getScrollBatchSemaphore()
, to limit the number of concurrent executions and avoid too much memory pressure.- Specified by:
scrollDescendants
in interfaceFolderItem
-
getCanCreateChild
public boolean getCanCreateChild()- Specified by:
getCanCreateChild
in interfaceFolderItem
-
createFolder
- Specified by:
createFolder
in interfaceFolderItem
overwrite
- allows to overwrite an existing folder with the same title
-
createFile
- Specified by:
createFile
in interfaceFolderItem
overwrite
- allows to overwrite an existing file with the same title
-
equals
- Overrides:
equals
in classAbstractFileSystemItem
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractFileSystemItem
-
setCanCreateChild
protected void setCanCreateChild(boolean canCreateChild) -
setCanScrollDescendants
protected void setCanScrollDescendants(boolean canScrollDescendants)
-