public class DocumentBackedFolderItem extends AbstractDocumentBackedFileSystemItem implements FolderItem
DocumentModel
backed implementation of a FolderItem
.Modifier and Type | Field and Description |
---|---|
protected boolean |
canCreateChild |
protected boolean |
canScrollDescendants |
protected static String |
DESCENDANTS_SCROLL_CACHE |
protected static String |
MAX_DESCENDANTS_BATCH_SIZE_DEFAULT |
protected static String |
MAX_DESCENDANTS_BATCH_SIZE_PROPERTY |
protected static int |
VCS_CHUNK_SIZE |
docId, docPath, docTitle, PERMISSION_CHECK_OPTIMIZED_PROPERTY, repositoryName
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 |
DocumentBackedFolderItem() |
|
DocumentBackedFolderItem(String factoryName,
DocumentModel doc) |
|
DocumentBackedFolderItem(String factoryName,
DocumentModel doc,
boolean relaxSyncRootConstraint) |
|
DocumentBackedFolderItem(String factoryName,
DocumentModel doc,
boolean relaxSyncRootConstraint,
boolean getLockInfo) |
|
DocumentBackedFolderItem(String factoryName,
FolderItem parentItem,
DocumentModel doc) |
|
DocumentBackedFolderItem(String factoryName,
FolderItem parentItem,
DocumentModel doc,
boolean relaxSyncRootConstraint) |
|
DocumentBackedFolderItem(String factoryName,
FolderItem parentItem,
DocumentModel doc,
boolean relaxSyncRootConstraint,
boolean getLockInfo) |
canMove, computeId, delete, getDocId, getDocPath, getDocument, getDocumentById, getRepositoryName, getTrashService, handleCollectionMember, move, parseFileSystemId, setId, updateLastModificationDate
compareTo, equals, getCanDelete, getCanRename, getCreationDate, getCreator, getFileSystemItemAdapterService, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, getUserName, hashCode, isFolder, setCanDelete, setCanRename, setCreationDate, setCreator, setFolder, setLastContributor, setLastModificationDate, setLockInfo, setName, setParentId, setPath, setUserName, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canMove, delete, getCanDelete, getCanRename, getCreationDate, getCreator, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, isFolder, move
compareTo
protected static final String DESCENDANTS_SCROLL_CACHE
protected static final String MAX_DESCENDANTS_BATCH_SIZE_PROPERTY
protected static final String MAX_DESCENDANTS_BATCH_SIZE_DEFAULT
protected static final int VCS_CHUNK_SIZE
protected boolean canCreateChild
protected boolean canScrollDescendants
public DocumentBackedFolderItem(String factoryName, DocumentModel doc)
public DocumentBackedFolderItem(String factoryName, DocumentModel doc, boolean relaxSyncRootConstraint)
public DocumentBackedFolderItem(String factoryName, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
public DocumentBackedFolderItem(String factoryName, FolderItem parentItem, DocumentModel doc)
public DocumentBackedFolderItem(String factoryName, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint)
public DocumentBackedFolderItem(String factoryName, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
protected DocumentBackedFolderItem()
public void rename(String name)
rename
in interface FileSystemItem
rename
in class AbstractFileSystemItem
public List<FileSystemItem> getChildren()
getChildren
in interface FolderItem
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
protected ScrollFileSystemItemList doScrollDescendants(String scrollId, int batchSize, long keepAlive)
protected void checkBatchSize(int batchSize)
protected ScrollDocumentModelList getScrollBatch(String scrollId, int batchSize, CoreSession session, long keepAlive)
protected List<String> getBatch(List<String> ids, int batchSize)
protected DocumentModelList fetchFromVCS(List<String> ids, CoreSession session)
protected DocumentModelList fetchFromVcsChunk(List<String> ids, CoreSession session)
protected List<FileSystemItem> adaptDocuments(DocumentModelList docs, CoreSession session)
protected FolderItem populateAncestorCache(Map<DocumentRef,FolderItem> cache, DocumentModel doc, CoreSession session, boolean cacheItem)
protected FolderItem getFolderItem(Map<DocumentRef,FolderItem> cache, DocumentModel doc, FolderItem parentItem, boolean cacheItem)
public boolean getCanCreateChild()
getCanCreateChild
in interface FolderItem
public FolderItem createFolder(String name)
createFolder
in interface FolderItem
public FileItem createFile(Blob blob)
createFile
in interface FolderItem
protected void initialize(DocumentModel doc)
protected FileManager getFileManager()
protected void setCanCreateChild(boolean canCreateChild)
protected void setCanScrollDescendants(boolean canScrollDescendants)
Copyright © 2016 Nuxeo SA. All rights reserved.