Package org.nuxeo.drive.service
Interface FileSystemItemManager
- All Known Implementing Classes:
FileSystemItemManagerImpl
public interface FileSystemItemManager
Provides an API to manage usual file system operations on a
FileSystemItem
given its id. Allows the following
actions:
- Read
- Read children
- Read descendants
- Create
- Update
- Delete
- Rename
- Move
- Author:
- Antoine Taillefer
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canMove
(String srcId, String destId, NuxeoPrincipal principal) Return true if theFileSystemItem
with the given source id can be moved to theFileSystemItem
with 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 theFileSystemItem
with the given id for the given principal.createFolder
(String parentId, String name, NuxeoPrincipal principal, boolean overwrite) Creates a folder with the given name in theFileSystemItem
with the given id for the given principal.void
delete
(String id, String parentId, NuxeoPrincipal principal) Deletes theFileSystemItem
with the given id and parent id for the given principal.void
delete
(String id, NuxeoPrincipal principal) Deletes theFileSystemItem
with the given id for the given principal.boolean
exists
(String id, NuxeoPrincipal principal) Returns true if aFileSystemItem
with the given id exists for the given principal.getChildren
(String id, NuxeoPrincipal principal) Gets the children of theFileSystemItem
with the given id for the given principal.getFileSystemItemById
(String id, String parentId, NuxeoPrincipal principal) Gets theFileSystemItem
with the given id and parent id for the given principal.getFileSystemItemById
(String id, NuxeoPrincipal principal) Gets theFileSystemItem
with the given id for the given principal.getTopLevelFolder
(NuxeoPrincipal principal) Gets the top levelFolderItem
for the given principal.move
(String srcId, String destId, NuxeoPrincipal principal) Moves theFileSystemItem
with the given source id to theFileSystemItem
with the given destination id for the given principal.rename
(String id, String name, NuxeoPrincipal principal) Renames theFileSystemItem
with the given id with the given name for the given principal.scrollDescendants
(String id, NuxeoPrincipal principal, String scrollId, int batchSize, long keepAlive) Retrieves at mostbatchSize
descendants of theFolderItem
with the givenid
for the givenprincipal
and the givenscrollId
.updateFile
(String id, String parentId, Blob blob, NuxeoPrincipal principal) Updates theFileSystemItem
with the given id and parent id with the given blob for the given principal.updateFile
(String id, Blob blob, NuxeoPrincipal principal) Updates theFileSystemItem
with the given id with the given blob for the given principal.
-
Method Details
-
getTopLevelFolder
Gets the top levelFolderItem
for the given principal. -
exists
Returns true if aFileSystemItem
with the given id exists for the given principal. -
getFileSystemItemById
Gets theFileSystemItem
with the given id for the given principal.- Returns:
- the
FileSystemItem
or null if none matches the given id - See Also:
-
getFileSystemItemById
Gets theFileSystemItem
with the given id and parent id for the given principal.- Returns:
- the
FileSystemItem
or null if none matches the given id and parent id - Since:
- 6.0
- See Also:
-
getChildren
Gets the children of theFileSystemItem
with the given id for the given principal.- See Also:
-
scrollDescendants
ScrollFileSystemItemList scrollDescendants(String id, NuxeoPrincipal principal, String scrollId, int batchSize, long keepAlive) Retrieves at mostbatchSize
descendants of theFolderItem
with the givenid
for the givenprincipal
and the givenscrollId
.When passing a null
scrollId
the initial search request is executed and the first batch of results is returned along with ascrollId
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 ifkeepAlive
is positive.Results are not necessarily sorted.
- Since:
- 8.3
- See Also:
-
canMove
Return true if theFileSystemItem
with the given source id can be moved to theFileSystemItem
with the given destination id for the given principal.- See Also:
-
createFolder
Creates a folder with the given name in theFileSystemItem
with the given id for the given principal.- Parameters:
overwrite
- allows to overwrite an existing folder with the same title- Since:
- 9.1
- See Also:
-
createFile
Creates a file with the given blob in theFileSystemItem
with the given id for the given principal.- Parameters:
overwrite
- allows to overwrite an existing file with the same title- Since:
- 9.1
- See Also:
-
updateFile
Updates theFileSystemItem
with the given id with the given blob for the given principal.- See Also:
-
updateFile
Updates theFileSystemItem
with the given id and parent id with the given blob for the given principal.- Since:
- 6.0
- See Also:
-
delete
Deletes theFileSystemItem
with the given id for the given principal.- See Also:
-
delete
Deletes theFileSystemItem
with the given id and parent id for the given principal.- Since:
- 6.0
- See Also:
-
rename
Renames theFileSystemItem
with the given id with the given name for the given principal.- See Also:
-
move
Moves theFileSystemItem
with the given source id to theFileSystemItem
with the given destination id for the given principal.- See Also:
-