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
public class FoldersClientSideElement extends StaticClientSideElement
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
Constructors Constructor Description FoldersClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
addFolder(String parentRelPath, String name)
Add a new folderMap<String,Object>
deleteFile(String relPath)
Remove a folder or a fileMap<String,Object>
renameFile(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 Detail
-
FoldersClientSideElement
public FoldersClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
addFolder
public Map<String,Object> addFolder(String parentRelPath, String name) throws IOException
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
public Map<String,Object> deleteFile(String relPath) throws IOException
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
public Map<String,Object> renameFile(String relPath, String name) throws IOException
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
-
-