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 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.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.getFileSystemItemById(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.
-
Method Details
-
getTopLevelFolder
Gets the top levelFolderItemfor the given principal. -
exists
Returns true if aFileSystemItemwith the given id exists for the given principal.- See Also:
-
getFileSystemItemById
Gets theFileSystemItemwith the given id for the given principal.- Returns:
- the
FileSystemItemor null if none matches the given id - See Also:
-
getFileSystemItemById
Gets theFileSystemItemwith the given id and parent id for the given principal.- Returns:
- the
FileSystemItemor null if none matches the given id and parent id - Since:
- 6.0
- See Also:
-
getChildren
Gets the children of theFileSystemItemwith the given id for the given principal.- See Also:
-
scrollDescendants
ScrollFileSystemItemList scrollDescendants(String id, NuxeoPrincipal principal, String scrollId, int batchSize, long keepAlive) Retrieves 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.
- Since:
- 8.3
- See Also:
-
canMove
Return true if theFileSystemItemwith the given source id can be moved to theFileSystemItemwith the given destination id for the given principal.- See Also:
-
createFolder
Creates a folder with the given name in theFileSystemItemwith 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 theFileSystemItemwith 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 theFileSystemItemwith the given id with the given blob for the given principal.- See Also:
-
updateFile
Updates theFileSystemItemwith the given id and parent id with the given blob for the given principal.- Since:
- 6.0
- See Also:
-
delete
Deletes theFileSystemItemwith the given id for the given principal.- See Also:
-
delete
Deletes theFileSystemItemwith the given id and parent id for the given principal.- Since:
- 6.0
- See Also:
-
rename
Renames theFileSystemItemwith the given id with the given name for the given principal.- See Also:
-
move
Moves theFileSystemItemwith the given source id to theFileSystemItemwith the given destination id for the given principal.- See Also:
-