Class ExtractionDetailsToolElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.plugins.extraction.execution.ExtractionDetailsToolElement
-
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class ExtractionDetailsToolElement extends StaticClientSideElement
Tool client side element for extraction edition tool
-
-
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 private ExtractionDefinitionReader
_reader
private SaveExtractionHelper
_saveHelper
private SourceResolver
_sourceResolver
-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description ExtractionDetailsToolElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Map<String,Object>
_getClausesVariablesNode(Extraction extraction)
private List<Map<String,Object>>
_getComponentNodes(List<ExtractionComponent> components)
private Map<String,Object>
_getOptionalColumnsNode(Extraction extraction)
Map<String,Object>
getExtractionDefinitionDetails(String definitionFile)
Retrieve extraction definition details.boolean
saveExtraction(String definitionFileName, Map<String,Object> extraction)
Saves modifications on extraction.void
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
-
-
-
-
Field Detail
-
_reader
private ExtractionDefinitionReader _reader
-
_sourceResolver
private SourceResolver _sourceResolver
-
_saveHelper
private SaveExtractionHelper _saveHelper
-
-
Constructor Detail
-
ExtractionDetailsToolElement
public ExtractionDetailsToolElement()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
getExtractionDefinitionDetails
public Map<String,Object> getExtractionDefinitionDetails(String definitionFile) throws Exception
Retrieve extraction definition details.- Parameters:
definitionFile
- The extraction's definition file path- Returns:
- a
Map
containing the extraction definition details - Throws:
Exception
- if an error occurs
-
_getClausesVariablesNode
private Map<String,Object> _getClausesVariablesNode(Extraction extraction)
-
_getOptionalColumnsNode
private Map<String,Object> _getOptionalColumnsNode(Extraction extraction)
-
_getComponentNodes
private List<Map<String,Object>> _getComponentNodes(List<ExtractionComponent> components)
-
saveExtraction
public boolean saveExtraction(String definitionFileName, Map<String,Object> extraction) throws Exception
Saves modifications on extraction. Creates the definition file if it doesn't exist- Parameters:
definitionFileName
- The extraction definition file nameextraction
- AMap
containing definition information- Returns:
true
if extraction saving succeed,false
otherwise- Throws:
Exception
- if an error occurs
-
-