Class JCRFolder
- java.lang.Object
-
- org.ametys.plugins.repository.metadata.jcr.JCRFolder
-
- All Implemented Interfaces:
Folder
,ModifiableFolder
@Deprecated public class JCRFolder extends Object implements ModifiableFolder
Deprecated.org.ametys.cms.data.RichText new class doesn't use folder anymoreJava binding of a nt:folder JCR Node.Text.escapeIllegalJcrChars(String)
is used for escaping invalid JCR characters or character sequences.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
getNode
public Node getNode()
Deprecated.Retrieves the underlying node.- Returns:
- the underlying node.
-
getName
public String getName() throws AmetysRepositoryException
Deprecated.Description copied from interface:Folder
Returns the folder name.- Specified by:
getName
in interfaceFolder
- Returns:
- the folder name.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getFolders
public Collection<ModifiableFolder> getFolders()
Deprecated.Description copied from interface:Folder
Returns a Collection containing all subfolders of this folder.- Specified by:
getFolders
in interfaceFolder
- Specified by:
getFolders
in interfaceModifiableFolder
- Returns:
- a Collection containing all subfolders of this folder.
-
getFolder
public ModifiableFolder getFolder(String folderName)
Deprecated.Description copied from interface:Folder
Returns the folder with the specified name.- Specified by:
getFolder
in interfaceFolder
- Specified by:
getFolder
in interfaceModifiableFolder
- Parameters:
folderName
- the name of the folder.- Returns:
- the folder with the specified name.
-
addFolder
public ModifiableFolder addFolder(String folderName)
Deprecated.Description copied from interface:ModifiableFolder
Add a folder with the specified name in this folder.- Specified by:
addFolder
in interfaceModifiableFolder
- Parameters:
folderName
- the folder name.- Returns:
- the created folder.
-
getFiles
public Collection<ModifiableFile> getFiles()
Deprecated.Description copied from interface:Folder
Returns a Collection containing all files of this folder.- Specified by:
getFiles
in interfaceFolder
- Specified by:
getFiles
in interfaceModifiableFolder
- Returns:
- a Collection containing all files of this folder.
-
hasFile
public boolean hasFile(String fileName) throws AmetysRepositoryException
Deprecated.Description copied from interface:Folder
Tests the existence of a file.- Specified by:
hasFile
in interfaceFolder
- Parameters:
fileName
- the name of the file.- Returns:
- true if the specified file exists in this folder.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getFile
public ModifiableFile getFile(String fileName)
Deprecated.Description copied from interface:Folder
Returns the file with the specified name.- Specified by:
getFile
in interfaceFolder
- Specified by:
getFile
in interfaceModifiableFolder
- Parameters:
fileName
- the name of the file.- Returns:
- the file with the specified name.
-
addFile
public ModifiableFile addFile(String fileName)
Deprecated.Description copied from interface:ModifiableFolder
Add a file with the specified name in this folder.- Specified by:
addFile
in interfaceModifiableFolder
- Parameters:
fileName
- the file name.- Returns:
- the created file.
-
remove
public void remove(String name) throws AmetysRepositoryException
Deprecated.Description copied from interface:ModifiableFolder
Removes the sub-element represented by the specified name.- Specified by:
remove
in interfaceModifiableFolder
- Parameters:
name
- the name of the folder or file to be removed.- Throws:
UnknownMetadataException
- if no folder nor file does exists.AmetysRepositoryException
- if an error occurs.
-
removeAll
public void removeAll() throws AmetysRepositoryException
Deprecated.Description copied from interface:ModifiableFolder
Removes all files and folders in this folder.- Specified by:
removeAll
in interfaceModifiableFolder
- Throws:
AmetysRepositoryException
- if an error occurs.
-
-