@Service public class SavedScriptRunner extends Object
Retrieve script from the database as freemarker template, render the script and return the result, script output and/or the name of a generated outputfile
If the script requires a security token, a token is generated that is available to the script as a parameter named 'molgenisToken'
If the script results in an outputfile (if script.resultFileExtension is not null) a ramdom name is generated with the correct extension, this is available to the script as a parameter named 'outputFile'
| Constructor and Description |
|---|
SavedScriptRunner(ScriptRunnerFactory scriptRunnerFactory,
org.molgenis.data.DataService dataService,
FileStore fileStore,
TokenService tokenService,
FileMetaFactory fileMetaFactory) |
| Modifier and Type | Method and Description |
|---|---|
ScriptResult |
runScript(String scriptName,
Map<String,Object> parameters)
Run a script with parameters.
|
public SavedScriptRunner(ScriptRunnerFactory scriptRunnerFactory, org.molgenis.data.DataService dataService, FileStore fileStore, TokenService tokenService, FileMetaFactory fileMetaFactory)
public ScriptResult runScript(String scriptName, Map<String,Object> parameters)
scriptName - name of the script to runparameters - parameters for the scriptUnknownScriptException - if scriptName is unknownGenerateScriptException - , if parameter is missingCopyright © 2018 Pivotal Software, Inc.. All rights reserved.