public abstract class AbstractVirtualFolderItem extends AbstractFileSystemItem implements FolderItem
FolderItem
.Modifier and Type | Field and Description |
---|---|
protected boolean |
canCreateChild |
protected boolean |
canScrollDescendants |
canDelete, canRename, creationDate, creator, factoryName, FILE_SYSTEM_ITEM_ID_SEPARATOR, folder, id, lastContributor, lastModificationDate, lockInfo, name, parentId, path, principal, userName
Modifier | Constructor and Description |
---|---|
protected |
AbstractVirtualFolderItem() |
|
AbstractVirtualFolderItem(String factoryName,
Principal principal,
String parentId,
String parentPath,
String folderName) |
Modifier and Type | Method and Description |
---|---|
boolean |
canMove(FolderItem dest) |
FileItem |
createFile(Blob blob,
boolean overwrite) |
FolderItem |
createFolder(String name,
boolean overwrite) |
void |
delete() |
boolean |
getCanCreateChild() |
boolean |
getCanScrollDescendants()
Returns
true if the FolderItem.scrollDescendants(String, int, long) API can be used. |
abstract List<FileSystemItem> |
getChildren() |
FileSystemItem |
move(FolderItem dest) |
void |
rename(String name) |
ScrollFileSystemItemList |
scrollDescendants(String scrollId,
int batchSize,
long keepAlive)
|
protected void |
setCanCreateChild(boolean canCreateChild) |
protected void |
setCanScrollDescendants(boolean canScrollDescendants) |
compareTo, equals, getCanDelete, getCanRename, getCreationDate, getCreator, getFileSystemItemAdapterService, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, getUserName, hashCode, isFolder, setCanDelete, setCanRename, setCreationDate, setCreator, setFolder, setId, setLastContributor, setLastModificationDate, setLockInfo, setName, setParentId, setPath, setUserName, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createFile, createFolder
getCanDelete, getCanRename, getCreationDate, getCreator, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, isFolder
compareTo
protected boolean canCreateChild
protected boolean canScrollDescendants
public AbstractVirtualFolderItem(String factoryName, Principal principal, String parentId, String parentPath, String folderName)
protected AbstractVirtualFolderItem()
public abstract List<FileSystemItem> getChildren()
getChildren
in interface FolderItem
public void rename(String name)
rename
in interface FileSystemItem
rename
in class AbstractFileSystemItem
public void delete()
delete
in interface FileSystemItem
delete
in class AbstractFileSystemItem
public boolean canMove(FolderItem dest)
canMove
in interface FileSystemItem
canMove
in class AbstractFileSystemItem
public FileSystemItem move(FolderItem dest)
move
in interface FileSystemItem
move
in class AbstractFileSystemItem
public boolean getCanScrollDescendants()
FolderItem
true
if the FolderItem.scrollDescendants(String, int, long)
API can be used.getCanScrollDescendants
in interface FolderItem
public ScrollFileSystemItemList scrollDescendants(String scrollId, int batchSize, long keepAlive)
FolderItem
batchSize
FileSystemItem
descendants for the given scrollId
.
When passing a null scrollId
the initial search request is executed and the first batch of results is
returned along with a scrollId
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 if keepAlive
is positive.
Results are not necessarily sorted.
This method is protected by a Semaphore
, made available by
FileSystemItemAdapterService.getScrollBatchSemaphore()
, to limit the number of concurrent executions and
avoid too much memory pressure.
scrollDescendants
in interface FolderItem
public boolean getCanCreateChild()
getCanCreateChild
in interface FolderItem
public FolderItem createFolder(String name, boolean overwrite)
createFolder
in interface FolderItem
overwrite
- allows to overwrite an existing folder with the same titlepublic FileItem createFile(Blob blob, boolean overwrite)
createFile
in interface FolderItem
overwrite
- allows to overwrite an existing file with the same titleprotected void setCanCreateChild(boolean canCreateChild)
protected void setCanScrollDescendants(boolean canScrollDescendants)
Copyright © 2018 Nuxeo. All rights reserved.