Package org.nuxeo.drive.service.impl
Class FileSystemItemManagerImpl
java.lang.Object
org.nuxeo.drive.service.impl.FileSystemItemManagerImpl
- All Implemented Interfaces:
FileSystemItemManager
Default implementation of the
FileSystemItemManager.- Author:
- Antoine Taillefer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanMove(String srcId, String destId, NuxeoPrincipal principal) Return true if theFileSystemItemwith the given source id can be moved to theFileSystemItemwith the given destination id for the given principal.createFile(String parentId, Blob blob, NuxeoPrincipal principal, boolean overwrite) Creates a file with the given blob in theFileSystemItemwith the given id for the given principal.createFolder(String parentId, String name, NuxeoPrincipal principal, boolean overwrite) Creates a folder with the given name in theFileSystemItemwith the given id for the given principal.voiddelete(String id, String parentId, NuxeoPrincipal principal) Deletes theFileSystemItemwith the given id and parent id for the given principal.voiddelete(String id, NuxeoPrincipal principal) Deletes theFileSystemItemwith the given id for the given principal.protected voiddelete(FileSystemItem fsItem) booleanexists(String id, NuxeoPrincipal principal) Returns true if aFileSystemItemwith the given id exists for the given principal.getChildren(String id, NuxeoPrincipal principal) Gets the children of theFileSystemItemwith the given id for the given principal.protected FileSystemItemAdapterServicegetFileSystemItemById(String id, String parentId, NuxeoPrincipal principal) Gets theFileSystemItemwith the given id and parent id for the given principal.getFileSystemItemById(String id, NuxeoPrincipal principal) Gets theFileSystemItemwith the given id for the given principal.getTopLevelFolder(NuxeoPrincipal principal) Gets the top levelFolderItemfor the given principal.move(String srcId, String destId, NuxeoPrincipal principal) Moves theFileSystemItemwith the given source id to theFileSystemItemwith the given destination id for the given principal.rename(String id, String name, NuxeoPrincipal principal) Renames theFileSystemItemwith the given id with the given name for the given principal.scrollDescendants(String id, NuxeoPrincipal principal, String scrollId, int batchSize, long keepAlive) Retrieves at mostbatchSizedescendants of theFolderItemwith the givenidfor the givenprincipaland the givenscrollId.updateFile(String id, String parentId, Blob blob, NuxeoPrincipal principal) Updates theFileSystemItemwith the given id and parent id with the given blob for the given principal.updateFile(String id, Blob blob, NuxeoPrincipal principal) Updates theFileSystemItemwith the given id with the given blob for the given principal.protected FileItemupdateFile(FileSystemItem fsItem, Blob blob)
-
Constructor Details
-
FileSystemItemManagerImpl
public FileSystemItemManagerImpl()
-
-
Method Details
-
getTopLevelFolder
Description copied from interface:FileSystemItemManagerGets the top levelFolderItemfor the given principal.- Specified by:
getTopLevelFolderin interfaceFileSystemItemManager
-
exists
Description copied from interface:FileSystemItemManagerReturns true if aFileSystemItemwith the given id exists for the given principal.- Specified by:
existsin interfaceFileSystemItemManager- See Also:
-
getFileSystemItemById
Description copied from interface:FileSystemItemManagerGets theFileSystemItemwith the given id for the given principal.- Specified by:
getFileSystemItemByIdin interfaceFileSystemItemManager- Returns:
- the
FileSystemItemor null if none matches the given id - See Also:
-
getFileSystemItemById
Description copied from interface:FileSystemItemManagerGets theFileSystemItemwith the given id and parent id for the given principal.- Specified by:
getFileSystemItemByIdin interfaceFileSystemItemManager- Returns:
- the
FileSystemItemor null if none matches the given id and parent id - See Also:
-
getChildren
Description copied from interface:FileSystemItemManagerGets the children of theFileSystemItemwith the given id for the given principal.- Specified by:
getChildrenin interfaceFileSystemItemManager- See Also:
-
scrollDescendants
public ScrollFileSystemItemList scrollDescendants(String id, NuxeoPrincipal principal, String scrollId, int batchSize, long keepAlive) Description copied from interface:FileSystemItemManagerRetrieves at mostbatchSizedescendants of theFolderItemwith the givenidfor the givenprincipaland 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.
- Specified by:
scrollDescendantsin interfaceFileSystemItemManager- See Also:
-
canMove
Description copied from interface:FileSystemItemManagerReturn true if theFileSystemItemwith the given source id can be moved to theFileSystemItemwith the given destination id for the given principal.- Specified by:
canMovein interfaceFileSystemItemManager- See Also:
-
createFolder
public FolderItem createFolder(String parentId, String name, NuxeoPrincipal principal, boolean overwrite) Description copied from interface:FileSystemItemManagerCreates a folder with the given name in theFileSystemItemwith the given id for the given principal.- Specified by:
createFolderin interfaceFileSystemItemManageroverwrite- allows to overwrite an existing folder with the same title- See Also:
-
createFile
Description copied from interface:FileSystemItemManagerCreates a file with the given blob in theFileSystemItemwith the given id for the given principal.- Specified by:
createFilein interfaceFileSystemItemManageroverwrite- allows to overwrite an existing file with the same title- See Also:
-
updateFile
Description copied from interface:FileSystemItemManagerUpdates theFileSystemItemwith the given id with the given blob for the given principal.- Specified by:
updateFilein interfaceFileSystemItemManager- See Also:
-
updateFile
Description copied from interface:FileSystemItemManagerUpdates theFileSystemItemwith the given id and parent id with the given blob for the given principal.- Specified by:
updateFilein interfaceFileSystemItemManager- See Also:
-
delete
Description copied from interface:FileSystemItemManagerDeletes theFileSystemItemwith the given id for the given principal.- Specified by:
deletein interfaceFileSystemItemManager- See Also:
-
delete
Description copied from interface:FileSystemItemManagerDeletes theFileSystemItemwith the given id and parent id for the given principal.- Specified by:
deletein interfaceFileSystemItemManager- See Also:
-
rename
Description copied from interface:FileSystemItemManagerRenames theFileSystemItemwith the given id with the given name for the given principal.- Specified by:
renamein interfaceFileSystemItemManager- See Also:
-
move
Description copied from interface:FileSystemItemManagerMoves theFileSystemItemwith the given source id to theFileSystemItemwith the given destination id for the given principal.- Specified by:
movein interfaceFileSystemItemManager- See Also:
-
getFileSystemItemAdapterService
-
updateFile
-
delete
-