Class FoldersClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.plugins.extraction.edition.FoldersClientSideElement
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
Component for operations on extraction folders
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
Field Summary
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a new folderdeleteFile
(String relPath) Remove a folder or a filerenameFile
(String relPath, String name) Rename a file or a foldervoid
service
(ServiceManager serviceManager) Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
FoldersClientSideElement
public FoldersClientSideElement()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
addFolder
Add a new folder- Parameters:
parentRelPath
- the relative parent file's path from parameters files root directoryname
- The name of folder to create- Returns:
- a map containing the name of the created folder, its path and the path of its parent
- Throws:
IOException
- If an error occurred while creating folder
-
deleteFile
Remove a folder or a file- Parameters:
relPath
- the relative file's path from parameters files root directory- Returns:
- the result map
- Throws:
IOException
- If an error occurs while removing the folder
-
renameFile
Rename a file or a folder- Parameters:
relPath
- the relative file's path from parameters files root directoryname
- the new name of the file/folder- Returns:
- the result map
- Throws:
IOException
- if an error occurs while renaming the file/folder
-