Class ExecuteExtractionClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.plugins.extraction.execution.ExecuteExtractionClientSideElement
-
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class ExecuteExtractionClientSideElement extends StaticClientSideElement
This client site element creates a button to execute an extraction
-
-
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 JSONUtils
_jsonUtils
private PipelineManager
_pipelineManager
private ExtractionDefinitionReader
_reader
private Scheduler
_scheduler
private SourceResolver
_sourceResolver
private UserManager
_userManager
-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description ExecuteExtractionClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Map<String,Object>
_getClauseVariableInputConfig(Map.Entry<String,String> clausesVariable)
private Map<String,Object>
_getMandatoryValidation()
private Map<String,Object>
_getOptionalColumnsInputConfig(String optionalColumn)
private Map<String,Object>
_getPipelineInputConfig(String definitionFile)
private Map<String,Object>
_getRecipientInputConfig()
Map<String,Object>
executeExtraction(String definitionFilePath, Map<String,Object> variables, String recipient, String pipelineId)
Execute the extractionMap<String,Object>
getExecutionParameters(String definitionFile)
Retrieve needed extraction parameters.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
-
_userManager
private UserManager _userManager
-
_reader
private ExtractionDefinitionReader _reader
-
_sourceResolver
private SourceResolver _sourceResolver
-
_jsonUtils
private JSONUtils _jsonUtils
-
_scheduler
private Scheduler _scheduler
-
_pipelineManager
private PipelineManager _pipelineManager
-
-
Constructor Detail
-
ExecuteExtractionClientSideElement
public ExecuteExtractionClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
getExecutionParameters
public Map<String,Object> getExecutionParameters(String definitionFile) throws Exception
Retrieve needed extraction parameters.- Parameters:
definitionFile
- The extraction definition file path- Returns:
- a
Map
containing parameters infos used to configure form to fill the parameters - Throws:
Exception
- if an error occurs
-
_getPipelineInputConfig
private Map<String,Object> _getPipelineInputConfig(String definitionFile)
-
_getClauseVariableInputConfig
private Map<String,Object> _getClauseVariableInputConfig(Map.Entry<String,String> clausesVariable)
-
_getOptionalColumnsInputConfig
private Map<String,Object> _getOptionalColumnsInputConfig(String optionalColumn)
-
_getRecipientInputConfig
private Map<String,Object> _getRecipientInputConfig()
-
_getMandatoryValidation
private Map<String,Object> _getMandatoryValidation()
-
executeExtraction
public Map<String,Object> executeExtraction(String definitionFilePath, Map<String,Object> variables, String recipient, String pipelineId) throws Exception
Execute the extraction- Parameters:
definitionFilePath
- The extraction definition file pathvariables
- clauses variables and optional columnsrecipient
- An email will be sent at this address when the extraction is completepipelineId
- The id of the extraction pipeline- Returns:
- a Map with error if one occurs
- Throws:
Exception
- if an error occurs
-
-