public class FileSystemItemManagerImpl extends Object implements FileSystemItemManager
FileSystemItemManager
.Constructor and Description |
---|
FileSystemItemManagerImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
canMove(String srcId,
String destId,
Principal 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. |
FileItem |
createFile(String parentId,
Blob blob,
Principal principal)
Creates a file with the given blob in the
FileSystemItem with the given id for the given principal. |
FolderItem |
createFolder(String parentId,
String name,
Principal principal)
Creates a folder with the given name in the
FileSystemItem with the given id for the given principal. |
void |
delete(String id,
Principal principal)
Deletes the
FileSystemItem with the given id for the given principal. |
void |
delete(String id,
String parentId,
Principal principal)
Deletes the
FileSystemItem with the given id and parent id for the given principal. |
boolean |
exists(String id,
Principal principal)
Returns true if a
FileSystemItem with the given id exists for the given principal. |
List<FileSystemItem> |
getChildren(String id,
Principal principal)
Gets the children of the
FileSystemItem with the given id for the given principal. |
FileSystemItem |
getFileSystemItemById(String id,
Principal principal)
Gets the
FileSystemItem with the given id for the given principal. |
FileSystemItem |
getFileSystemItemById(String id,
String parentId,
Principal principal)
Gets the
FileSystemItem with the given id and parent id for the given principal. |
CoreSession |
getSession(String repositoryName,
Principal principal)
Deprecated.
|
List<FileSystemItem> |
getTopLevelChildren(Principal principal)
Gets the children of the top level
FolderItem for the given principal. |
FolderItem |
getTopLevelFolder(Principal principal)
Gets the top level
FolderItem for the given principal. |
FileSystemItem |
move(String srcId,
String destId,
Principal 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,
Principal principal)
Renames the
FileSystemItem with the given id with the given name for the given principal. |
FileItem |
updateFile(String id,
Blob blob,
Principal principal)
Updates the
FileSystemItem with the given id with the given blob for the given principal. |
FileItem |
updateFile(String id,
String parentId,
Blob blob,
Principal principal)
Updates the
FileSystemItem with the given id and parent id with the given blob for the given principal. |
@Deprecated public CoreSession getSession(String repositoryName, Principal principal) throws ClientException
FileSystemItemManager
getSession
in interface FileSystemItemManager
ClientException
public List<FileSystemItem> getTopLevelChildren(Principal principal) throws ClientException
FileSystemItemManager
FolderItem
for the given principal.getTopLevelChildren
in interface FileSystemItemManager
ClientException
- if the top level FolderItem
or its children cannot be retrievedpublic FolderItem getTopLevelFolder(Principal principal) throws ClientException
FileSystemItemManager
FolderItem
for the given principal.getTopLevelFolder
in interface FileSystemItemManager
ClientException
- if the top level FolderItem
cannot be retrievedpublic boolean exists(String id, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id exists for the given principal.exists
in interface FileSystemItemManager
ClientException
- if no FileSystemItemFactory
can handle the given FileSystemItem
id or if
an error occurs while checking the existenceFileSystemItemFactory.exists(String, Principal)
public FileSystemItem getFileSystemItemById(String id, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id for the given principal.getFileSystemItemById
in interface FileSystemItemManager
FileSystemItem
or null if none matches the given idClientException
- if no FileSystemItemFactory
can handle the given FileSystemItem
id or if
an error occurs while retrieving the itemFileSystemItemFactory.getFileSystemItemById(String, Principal)
public FileSystemItem getFileSystemItemById(String id, String parentId, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id and parent id for the given principal.getFileSystemItemById
in interface FileSystemItemManager
FileSystemItem
or null if none matches the given id and parent idClientException
- if no FileSystemItemFactory
can handle the given FileSystemItem
ids or if
an error occurs while retrieving the itemFileSystemItemManager.getFileSystemItemById(String, Principal)
public List<FileSystemItem> getChildren(String id, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id for the given principal.getChildren
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given id cannot be retrieved, or if it is not a
FolderItem
or if an error occurs while retrieving the childrenFolderItem.getChildren()
public boolean canMove(String srcId, String destId, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given source id can be moved to the FileSystemItem
with the given destination id for the given principal.canMove
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given source or destination id cannot be retrievedFileSystemItem#getCanMove(String)
public FolderItem createFolder(String parentId, String name, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id for the given principal.createFolder
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given id cannot be retrieved, or if it is not a
FolderItem
or if an error occurs while creating the folderFolderItem.createFolder(String)
public FileItem createFile(String parentId, Blob blob, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id for the given principal.createFile
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given id cannot be retrieved, or if it is not a
FolderItem
or if an error occurs while creating the fileFolderItem.createFile(Blob)
public FileItem updateFile(String id, Blob blob, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id with the given blob for the given principal.updateFile
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given id cannot be retrieved, or if it is not a
FileItem
or if an error occurs while updating the fileFileItem.setBlob(Blob)
public FileItem updateFile(String id, String parentId, Blob blob, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id and parent id with the given blob for the given principal.updateFile
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given id and parent id cannot be retrieved, or if
it is not a FileItem
or if an error occurs while updating the fileFileSystemItemManager.updateFile(String, Blob, Principal)
public void delete(String id, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id for the given principal.delete
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given id cannot be retrieved or if an error occurs
while deleting the itemFileSystemItem.delete()
public void delete(String id, String parentId, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id and parent id for the given principal.delete
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given id and parent id cannot be retrieved or if
an error occurs while deleting the itemFileSystemItemManager.delete(String, Principal)
public FileSystemItem rename(String id, String name, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given id with the given name for the given principal.rename
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given id cannot be retrieved or if an error occurs
while renaming the itemFileSystemItem.rename(String)
public FileSystemItem move(String srcId, String destId, Principal principal) throws ClientException
FileSystemItemManager
FileSystemItem
with the given source id to the FileSystemItem
with the given
destination id for the given principal.move
in interface FileSystemItemManager
ClientException
- if the FileSystemItem
with the given source or destination id cannot be
retrieved, if the FileSystemItem
with the given destination id is not a folder or if an error
occurs while moving the itemFileSystemItem#move(String)
Copyright © 2015 Nuxeo SA. All rights reserved.