com.dtolabs.rundeck.core.plugins
Class BaseScriptPlugin
java.lang.Object
com.dtolabs.rundeck.core.plugins.AbstractDescribableScriptPlugin
com.dtolabs.rundeck.core.plugins.BaseScriptPlugin
- All Implemented Interfaces:
- Describable
public abstract class BaseScriptPlugin
- extends AbstractDescribableScriptPlugin
BaseScriptPlugin provides common methods for running scripts, used by the script plugin implementations.
Fields inherited from class com.dtolabs.rundeck.core.plugins.AbstractDescribableScriptPlugin |
CONFIG_DEFAULT, CONFIG_DESCRIPTION, CONFIG_NAME, CONFIG_PROP_PREFIX, CONFIG_RENDERING_OPTIONS, CONFIG_REQUIRED, CONFIG_SCOPE, CONFIG_TITLE, CONFIG_TYPE, CONFIG_VALUES, DESCRIPTION_PROP, TITLE_PROP |
Method Summary |
protected java.lang.String[] |
createScriptArgs(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> localDataContext)
Create the command array for the data context. |
protected ExecArgList |
createScriptArgsList(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dataContext)
Create the command array for the data context. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
createScriptDataContext(Framework framework,
java.lang.String project,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> context)
|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
createStepItemDataContext(Framework framework,
java.lang.String project,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> context,
java.util.Map<java.lang.String,java.lang.Object> configuration)
Create a data context containing the plugin values "file","scriptfile" and "base", as well as all config values. |
protected int |
runPluginScript(PluginStepContext executionContext,
java.io.PrintStream outputStream,
java.io.PrintStream errorStream,
Framework framework,
java.util.Map<java.lang.String,java.lang.Object> configuration)
Runs the script configured for the script plugin and channels the output to two streams. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseScriptPlugin
protected BaseScriptPlugin(ScriptPluginProvider provider,
Framework framework)
runPluginScript
protected int runPluginScript(PluginStepContext executionContext,
java.io.PrintStream outputStream,
java.io.PrintStream errorStream,
Framework framework,
java.util.Map<java.lang.String,java.lang.Object> configuration)
throws java.io.IOException,
java.lang.InterruptedException
- Runs the script configured for the script plugin and channels the output to two streams.
- Throws:
java.io.IOException
- if any IO exception occurs
java.lang.InterruptedException
- if interrupted while waiting for the command to finish
createStepItemDataContext
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> createStepItemDataContext(Framework framework,
java.lang.String project,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> context,
java.util.Map<java.lang.String,java.lang.Object> configuration)
- Create a data context containing the plugin values "file","scriptfile" and "base", as well as all config values.
createScriptDataContext
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> createScriptDataContext(Framework framework,
java.lang.String project,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> context)
createScriptArgs
protected java.lang.String[] createScriptArgs(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> localDataContext)
- Create the command array for the data context.
createScriptArgsList
protected ExecArgList createScriptArgsList(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dataContext)
- Create the command array for the data context.