public class ScriptRunner
extends java.lang.Object
Constructor and Description |
---|
ScriptRunner() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
getUserScriptDirectory() |
static java.lang.String |
getUserScriptDirectoryName() |
static java.lang.Object |
runScript(java.lang.String language,
java.util.Map<java.lang.String,java.lang.Object> inputs,
java.io.File script,
java.io.File[] binDirs)
session will be created if it isn't already, session will surround the script run so user don't have to manage sessions
|
static java.lang.Object |
runScriptFromStereotype(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e,
com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype s,
java.util.Map<java.lang.String,java.lang.Object> addInputs)
runs the script with stereotype tag values plus additional inputs to scriptInput
|
public static java.lang.String getUserScriptDirectoryName()
public static java.io.File getUserScriptDirectory()
public static java.lang.Object runScriptFromStereotype(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element e, com.nomagic.uml2.ext.magicdraw.mdprofiles.Stereotype s, java.util.Map<java.lang.String,java.lang.Object> addInputs) throws javax.script.ScriptException
e
- s
- addInputs
- additional inputs to add to scriptInputjavax.script.ScriptException
public static java.lang.Object runScript(java.lang.String language, java.util.Map<java.lang.String,java.lang.Object> inputs, java.io.File script, java.io.File[] binDirs) throws javax.script.ScriptException
language
- inputs
- A map of key/value pair of script input (it can be anything really, as long as the script knows what to do with it. the inputs object will be passed to the script
as 'scriptInput'script
- File of the script filebinDirs
- File of the script directoryjavax.script.ScriptException