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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanFields 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
ConstructorsModifierConstructorDescriptionprotectedAbstractVirtualFolderItem(String factoryName, NuxeoPrincipal principal, String parentId, String parentPath, String folderName) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanMove(FolderItem dest) createFile(Blob blob, boolean overwrite) createFolder(String name, boolean overwrite) voiddelete()booleanbooleanbooleanReturnstrueif theFolderItem.scrollDescendants(String, int, long)API can be used.inthashCode()move(FolderItem dest) voidscrollDescendants(String scrollId, int batchSize, long keepAlive) protected voidsetCanCreateChild(boolean canCreateChild) protected voidsetCanScrollDescendants(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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.nuxeo.drive.adapter.FileSystemItem
getCanDelete, getCanRename, getCreationDate, getCreator, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, isFolderMethods 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:
renamein interfaceFileSystemItem
-
delete
public void delete()- Specified by:
deletein interfaceFileSystemItem
-
canMove
- Specified by:
canMovein interfaceFileSystemItem
-
move
- Specified by:
movein interfaceFileSystemItem
-
getCanScrollDescendants
public boolean getCanScrollDescendants()Description copied from interface:FolderItemReturnstrueif theFolderItem.scrollDescendants(String, int, long)API can be used.- Specified by:
getCanScrollDescendantsin interfaceFolderItem
-
scrollDescendants
Description copied from interface:FolderItemRetrieves at mostbatchSizeFileSystemItemdescendants for the givenscrollId.When passing a null
scrollIdthe initial search request is executed and the first batch of results is returned along with ascrollIdwhich 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
keepAlivemilliseconds ifkeepAliveis 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:
scrollDescendantsin interfaceFolderItem
-
getCanCreateChild
public boolean getCanCreateChild()- Specified by:
getCanCreateChildin interfaceFolderItem
-
createFolder
- Specified by:
createFolderin interfaceFolderItem- Parameters:
overwrite- allows to overwrite an existing folder with the same title
-
createFile
- Specified by:
createFilein interfaceFolderItem- Parameters:
overwrite- allows to overwrite an existing file with the same title
-
equals
- Overrides:
equalsin classAbstractFileSystemItem
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractFileSystemItem
-
setCanCreateChild
protected void setCanCreateChild(boolean canCreateChild) -
setCanScrollDescendants
protected void setCanScrollDescendants(boolean canScrollDescendants)
-