public interface FileSystemItemManager
FileSystemItem
given its id. Allows the following
actions:
FileSystemItemManagerImpl
Modifier and Type | Method and Description |
---|---|
boolean |
canMove(String srcId,
String destId,
NuxeoPrincipal principal)
Return true if the
FileSystemItem with the given source id can be moved to the FileSystemItem
with the given destination id for the given principal. |
default FileItem |
createFile(String parentId,
Blob blob,
NuxeoPrincipal principal)
Deprecated.
since 9.1, use
createFile(String, Blob, NuxeoPrincipal, boolean) instead |
FileItem |
createFile(String parentId,
Blob blob,
NuxeoPrincipal principal,
boolean overwrite)
Creates a file with the given blob in the
FileSystemItem with the given id for the given principal. |
default FolderItem |
createFolder(String parentId,
String name,
NuxeoPrincipal principal)
Deprecated.
since 9.1, use
createFolder(String, String, NuxeoPrincipal, boolean) instead |
FolderItem |
createFolder(String parentId,
String name,
NuxeoPrincipal principal,
boolean overwrite)
Creates a folder with the given name in the
FileSystemItem with the given id for the given principal. |
void |
delete(String id,
NuxeoPrincipal principal)
Deletes the
FileSystemItem with the given id for the given principal. |
void |
delete(String id,
String parentId,
NuxeoPrincipal principal)
Deletes the
FileSystemItem with the given id and parent id for the given principal. |
boolean |
exists(String id,
NuxeoPrincipal principal)
Returns true if a
FileSystemItem with the given id exists for the given principal. |
List<FileSystemItem> |
getChildren(String id,
NuxeoPrincipal principal)
Gets the children of the
FileSystemItem with the given id for the given principal. |
FileSystemItem |
getFileSystemItemById(String id,
NuxeoPrincipal principal)
Gets the
FileSystemItem with the given id for the given principal. |
FileSystemItem |
getFileSystemItemById(String id,
String parentId,
NuxeoPrincipal principal)
Gets the
FileSystemItem with the given id and parent id for the given principal. |
FolderItem |
getTopLevelFolder(NuxeoPrincipal principal)
Gets the top level
FolderItem for the given principal. |
FileSystemItem |
move(String srcId,
String destId,
NuxeoPrincipal principal)
Moves the
FileSystemItem with the given source id to the FileSystemItem with the given
destination id for the given principal. |
FileSystemItem |
rename(String id,
String name,
NuxeoPrincipal principal)
Renames the
FileSystemItem with the given id with the given name for the given principal. |
ScrollFileSystemItemList |
scrollDescendants(String id,
NuxeoPrincipal principal,
String scrollId,
int batchSize,
long keepAlive)
Retrieves at most
batchSize descendants of the FolderItem with the given id for the given
principal and the given scrollId . |
FileItem |
updateFile(String id,
Blob blob,
NuxeoPrincipal principal)
Updates the
FileSystemItem with the given id with the given blob for the given principal. |
FileItem |
updateFile(String id,
String parentId,
Blob blob,
NuxeoPrincipal principal)
Updates the
FileSystemItem with the given id and parent id with the given blob for the given principal. |
FolderItem getTopLevelFolder(NuxeoPrincipal principal)
FolderItem
for the given principal.boolean exists(String id, NuxeoPrincipal principal)
FileSystemItem
with the given id exists for the given principal.FileSystemItem getFileSystemItemById(String id, NuxeoPrincipal principal)
FileSystemItem
with the given id for the given principal.FileSystemItem
or null if none matches the given idFileSystemItemFactory.getFileSystemItemById(String, NuxeoPrincipal)
FileSystemItem getFileSystemItemById(String id, String parentId, NuxeoPrincipal principal)
FileSystemItem
with the given id and parent id for the given principal.FileSystemItem
or null if none matches the given id and parent idgetFileSystemItemById(String, NuxeoPrincipal)
List<FileSystemItem> getChildren(String id, NuxeoPrincipal principal)
FileSystemItem
with the given id for the given principal.FolderItem.getChildren()
ScrollFileSystemItemList scrollDescendants(String id, NuxeoPrincipal principal, String scrollId, int batchSize, long keepAlive)
batchSize
descendants of the FolderItem
with the given id
for the given
principal
and 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.
FolderItem.scrollDescendants(String, int, long)
boolean canMove(String srcId, String destId, NuxeoPrincipal principal)
FileSystemItem
with the given source id can be moved to the FileSystemItem
with the given destination id for the given principal.FileSystemItem#getCanMove(String)
@Deprecated default FolderItem createFolder(String parentId, String name, NuxeoPrincipal principal)
createFolder(String, String, NuxeoPrincipal, boolean)
insteadFileSystemItem
with the given id for the given principal.FolderItem.createFolder(String)
FolderItem createFolder(String parentId, String name, NuxeoPrincipal principal, boolean overwrite)
FileSystemItem
with the given id for the given principal.overwrite
- allows to overwrite an existing folder with the same titleFolderItem.createFolder(String, boolean)
@Deprecated default FileItem createFile(String parentId, Blob blob, NuxeoPrincipal principal)
createFile(String, Blob, NuxeoPrincipal, boolean)
insteadFileSystemItem
with the given id for the given principal.FolderItem.createFile(Blob)
FileItem createFile(String parentId, Blob blob, NuxeoPrincipal principal, boolean overwrite)
FileSystemItem
with the given id for the given principal.overwrite
- allows to overwrite an existing file with the same titleFolderItem.createFile(Blob, boolean)
FileItem updateFile(String id, Blob blob, NuxeoPrincipal principal)
FileSystemItem
with the given id with the given blob for the given principal.FileItem.setBlob(Blob)
FileItem updateFile(String id, String parentId, Blob blob, NuxeoPrincipal principal)
FileSystemItem
with the given id and parent id with the given blob for the given principal.updateFile(String, Blob, NuxeoPrincipal)
void delete(String id, NuxeoPrincipal principal)
FileSystemItem
with the given id for the given principal.FileSystemItem.delete()
void delete(String id, String parentId, NuxeoPrincipal principal)
FileSystemItem
with the given id and parent id for the given principal.delete(String, NuxeoPrincipal)
FileSystemItem rename(String id, String name, NuxeoPrincipal principal)
FileSystemItem
with the given id with the given name for the given principal.FileSystemItem.rename(String)
FileSystemItem move(String srcId, String destId, NuxeoPrincipal principal)
FileSystemItem
with the given source id to the FileSystemItem
with the given
destination id for the given principal.FileSystemItem#move(String)
Copyright © 2019 Nuxeo. All rights reserved.