Class EditExtractionClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.plugins.extraction.edition.EditExtractionClientSideElement
-
- All Implemented Interfaces:
ClientSideElement,LogEnabled,PluginAware,Configurable,Serviceable
public class EditExtractionClientSideElement extends StaticClientSideElement
This client site element manages a button to create an extraction definition file
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
-
Field Summary
Fields Modifier and Type Field Description static StringROLEThe Avalon role name-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description EditExtractionClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>addDescription(String definitionFileName, String descriptionId)Adds a description to an extraction.Map<String,Object>createExtraction(String relativeDefinitionFilePath, String language)Creates an extraction definition file.booleandeleteExtraction(String definitionFileName)Deletes an extraction definition file.Map<String,Object>renameExtraction(String relativeOldFilePath, String newFileName)Renames an extraction definition file.voidservice(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
-
EditExtractionClientSideElement
public EditExtractionClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classStaticFileImportsClientSideElement- Throws:
ServiceException
-
createExtraction
public Map<String,Object> createExtraction(String relativeDefinitionFilePath, String language) throws Exception
Creates an extraction definition file.- Parameters:
relativeDefinitionFilePath- The path of the extraction definition file to create. This path has to be relative to the base definition directory.language- the language used to create the description- Returns:
- Map containing success boolean and the created extraction informations, or error codes if one occurs
- Throws:
Exception- if an error occurs
-
addDescription
public Map<String,Object> addDescription(String definitionFileName, String descriptionId) throws Exception
Adds a description to an extraction.- Parameters:
definitionFileName- The extraction definition file namedescriptionId- the identifier of the description- Returns:
- Map containing success boolean and error codes if one occurs
- Throws:
Exception- if an error occurs
-
renameExtraction
public Map<String,Object> renameExtraction(String relativeOldFilePath, String newFileName) throws Exception
Renames an extraction definition file.- Parameters:
relativeOldFilePath- The extraction definition old file path, relative to the base definitions directorynewFileName- The extraction definition new file name- Returns:
- Map containing success boolean and error codes if one occurs
- Throws:
Exception- if an error occurs
-
deleteExtraction
public boolean deleteExtraction(String definitionFileName) throws Exception
Deletes an extraction definition file.- Parameters:
definitionFileName- The extraction definition file to delete- Returns:
trueif extraction deletion succeed,falseotherwise- Throws:
Exception- if an error occurs
-
-