Package org.nuxeo.drive.adapter.impl
Class CollectionSyncRootFolderItem
java.lang.Object
org.nuxeo.drive.adapter.impl.AbstractFileSystemItem
org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem
org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem
org.nuxeo.drive.adapter.impl.DefaultSyncRootFolderItem
org.nuxeo.drive.adapter.impl.CollectionSyncRootFolderItem
- All Implemented Interfaces:
Comparable<FileSystemItem>,FileSystemItem,FolderItem
Default implementation of a collection synchronization root
FolderItem.- Since:
- 6.0
- Author:
- Antoine Taillefer
-
Field Summary
Fields inherited from class org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem
canCreateChild, canScrollDescendants, DESCENDANTS_SCROLL_CACHE, MAX_DESCENDANTS_BATCH_SIZE_DEFAULT, MAX_DESCENDANTS_BATCH_SIZE_PROPERTY, VCS_CHUNK_SIZEFields inherited from class org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem
docId, docPath, docTitle, PERMISSION_CHECK_OPTIMIZED_PROPERTY, repositoryNameFields 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
ConstructorsModifierConstructorDescriptionprotectedCollectionSyncRootFolderItem(String factoryName, FolderItem parentItem, DocumentModel doc) CollectionSyncRootFolderItem(String factoryName, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint) CollectionSyncRootFolderItem(String factoryName, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo) -
Method Summary
Modifier and TypeMethodDescriptioncreateFile(Blob blob, boolean overwrite) createFolder(String name, boolean overwrite) protected final voidinitialize(DocumentModel doc) scrollDescendants(String scrollId, int batchSize, long keepAlive) Methods inherited from class org.nuxeo.drive.adapter.impl.DefaultSyncRootFolderItem
canMove, delete, moveMethods inherited from class org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem
adaptDocuments, checkBatchSize, doScrollDescendants, equals, fetchFromVCS, fetchFromVcsChunk, getBatch, getCanCreateChild, getCanScrollDescendants, getFileManager, getFolderItem, getScrollBatch, hashCode, populateAncestorCache, rename, setCanCreateChild, setCanScrollDescendantsMethods inherited from class org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem
computeId, getDocId, getDocPath, getDocument, getDocumentById, getRepositoryName, getTrashService, handleCollectionMember, parseFileSystemId, setId, updateLastModificationDateMethods 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, 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, isFolder
-
Constructor Details
-
CollectionSyncRootFolderItem
-
CollectionSyncRootFolderItem
public CollectionSyncRootFolderItem(String factoryName, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint) -
CollectionSyncRootFolderItem
public CollectionSyncRootFolderItem(String factoryName, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo) -
CollectionSyncRootFolderItem
protected CollectionSyncRootFolderItem()
-
-
Method Details
-
getChildren
- Specified by:
getChildrenin interfaceFolderItem- Overrides:
getChildrenin classDocumentBackedFolderItem
-
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- Overrides:
scrollDescendantsin classDocumentBackedFolderItem
-
createFolder
- Specified by:
createFolderin interfaceFolderItem- Overrides:
createFolderin classDocumentBackedFolderItemoverwrite- allows to overwrite an existing folder with the same title
-
createFile
- Specified by:
createFilein interfaceFolderItem- Overrides:
createFilein classDocumentBackedFolderItemoverwrite- allows to overwrite an existing file with the same title
-
initialize
- Overrides:
initializein classDocumentBackedFolderItem
-