public interface ModifiableFolder extends Folder
Modifier and Type | Method and Description |
---|---|
ModifiableFile |
addFile(String fileName)
Add a file with the specified name in this folder.
|
ModifiableFolder |
addFolder(String folderName)
Add a folder with the specified name in this folder.
|
ModifiableFile |
getFile(String fileName)
Returns the file with the specified name.
|
Collection<ModifiableFile> |
getFiles()
Returns a Collection containing all files of this folder.
|
ModifiableFolder |
getFolder(String folderName)
Returns the folder with the specified name.
|
Collection<ModifiableFolder> |
getFolders()
Returns a Collection containing all subfolders of this folder.
|
void |
remove(String name)
Removes the sub-element represented by the specified name.
|
void |
removeAll()
Removes all files and folders in this folder.
|
Collection<ModifiableFolder> getFolders() throws AmetysRepositoryException
Folder
getFolders
in interface Folder
AmetysRepositoryException
- if an error occursModifiableFolder getFolder(String folderName) throws UnknownMetadataException, AmetysRepositoryException
Folder
getFolder
in interface Folder
folderName
- the name of the folder.UnknownMetadataException
- if the folder does not exist.AmetysRepositoryException
- if an error occurs.Collection<ModifiableFile> getFiles() throws AmetysRepositoryException
Folder
getFiles
in interface Folder
AmetysRepositoryException
- if an error occurs.ModifiableFile getFile(String fileName) throws UnknownMetadataException, AmetysRepositoryException
Folder
getFile
in interface Folder
fileName
- the name of the file.UnknownMetadataException
- if the folder does not exist.AmetysRepositoryException
- if an error occurs.ModifiableFolder addFolder(String folderName) throws RepositoryIntegrityViolationException, AmetysRepositoryException
folderName
- the folder name.RepositoryIntegrityViolationException
- if a file
or a folder already exists with the given name.AmetysRepositoryException
- if an error occurs.ModifiableFile addFile(String fileName) throws RepositoryIntegrityViolationException, AmetysRepositoryException
fileName
- the file name.RepositoryIntegrityViolationException
- if a file
or a folder already exists with the given name.AmetysRepositoryException
- if an error occurs.void remove(String name) throws UnknownMetadataException, AmetysRepositoryException
name
- the name of the folder or file to be removed.UnknownMetadataException
- if no folder nor file does exists.AmetysRepositoryException
- if an error occurs.void removeAll() throws AmetysRepositoryException
AmetysRepositoryException
- if an error occurs.