@Deprecated public class JCRFolder extends Object implements ModifiableFolder
Text.escapeIllegalJcrChars(String)
is used for
escaping invalid JCR characters or character sequences.
Modifier and Type | Field and Description |
---|---|
private boolean |
_lockAlreadyChecked
Deprecated.
|
private Node |
_node
Deprecated.
|
Constructor and Description |
---|
JCRFolder(Node node)
Deprecated.
Constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
_checkLock()
Deprecated.
|
ModifiableFile |
addFile(String fileName)
Deprecated.
Add a file with the specified name in this folder.
|
ModifiableFolder |
addFolder(String folderName)
Deprecated.
Add a folder with the specified name in this folder.
|
ModifiableFile |
getFile(String fileName)
Deprecated.
Returns the file with the specified name.
|
Collection<ModifiableFile> |
getFiles()
Deprecated.
Returns a Collection containing all files of this folder.
|
ModifiableFolder |
getFolder(String folderName)
Deprecated.
Returns the folder with the specified name.
|
Collection<ModifiableFolder> |
getFolders()
Deprecated.
Returns a Collection containing all subfolders of this folder.
|
String |
getName()
Deprecated.
Returns the folder name.
|
Node |
getNode()
Deprecated.
Retrieves the underlying node.
|
boolean |
hasFile(String fileName)
Deprecated.
Tests the existence of a file.
|
void |
remove(String name)
Deprecated.
Removes the sub-element represented by the specified name.
|
void |
removeAll()
Deprecated.
Removes all files and folders in this folder.
|
private boolean _lockAlreadyChecked
public Node getNode()
public String getName() throws AmetysRepositoryException
Folder
getName
in interface Folder
AmetysRepositoryException
- if an error occurs.public Collection<ModifiableFolder> getFolders()
Folder
getFolders
in interface Folder
getFolders
in interface ModifiableFolder
public ModifiableFolder getFolder(String folderName)
Folder
getFolder
in interface Folder
getFolder
in interface ModifiableFolder
folderName
- the name of the folder.public ModifiableFolder addFolder(String folderName)
ModifiableFolder
addFolder
in interface ModifiableFolder
folderName
- the folder name.public Collection<ModifiableFile> getFiles()
Folder
getFiles
in interface Folder
getFiles
in interface ModifiableFolder
public boolean hasFile(String fileName) throws AmetysRepositoryException
Folder
hasFile
in interface Folder
fileName
- the name of the file.AmetysRepositoryException
- if an error occurs.public ModifiableFile getFile(String fileName)
Folder
getFile
in interface Folder
getFile
in interface ModifiableFolder
fileName
- the name of the file.public ModifiableFile addFile(String fileName)
ModifiableFolder
addFile
in interface ModifiableFolder
fileName
- the file name.public void remove(String name) throws AmetysRepositoryException
ModifiableFolder
remove
in interface ModifiableFolder
name
- the name of the folder or file to be removed.UnknownMetadataException
- if no folder nor file does exists.AmetysRepositoryException
- if an error occurs.public void removeAll() throws AmetysRepositoryException
ModifiableFolder
removeAll
in interface ModifiableFolder
AmetysRepositoryException
- if an error occurs.private void _checkLock() throws RepositoryException
RepositoryException