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, repositoryNamecanDelete, 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, updateLastModificationDatecompareTo, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcanMove, delete, getCanDelete, getCanRename, getCreationDate, getCreator, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, isFolder, movecompareToprotected 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 FileSystemItemrename in class AbstractFileSystemItempublic List<FileSystemItem> getChildren()
getChildren in interface FolderItempublic boolean getCanScrollDescendants()
FolderItemtrue if the FolderItem.scrollDescendants(String, int, long) API can be used.getCanScrollDescendants in interface FolderItempublic ScrollFileSystemItemList scrollDescendants(String scrollId, int batchSize, long keepAlive)
FolderItembatchSize 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 FolderItemprotected 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 FolderItempublic FolderItem createFolder(String name)
createFolder in interface FolderItempublic FileItem createFile(Blob blob)
createFile in interface FolderItemprotected void initialize(DocumentModel doc)
protected FileManager getFileManager()
protected void setCanCreateChild(boolean canCreateChild)
protected void setCanScrollDescendants(boolean canScrollDescendants)
Copyright © 2016 Nuxeo SA. All rights reserved.