com.dtolabs.rundeck.core.execution.workflow.steps.node.impl
Class ScriptFileNodeStepExecutor

java.lang.Object
  extended by com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.ScriptFileNodeStepExecutor
All Implemented Interfaces:
NodeStepExecutor

public class ScriptFileNodeStepExecutor
extends java.lang.Object
implements NodeStepExecutor

ExecFileCommandInterpreter uses ExecutionService to execute a script on a node.


Field Summary
static java.lang.String SERVICE_IMPLEMENTATION_NAME
           
 
Constructor Summary
ScriptFileNodeStepExecutor(Framework framework)
           
 
Method Summary
 NodeStepResult executeNodeStep(StepExecutionContext context, NodeStepExecutionItem item, INodeEntry node)
          Execute the step
static NodeStepResult executeRemoteScript(ExecutionContext context, Framework framework, INodeEntry node, java.lang.String[] args, java.lang.String filepath)
          Execute a scriptfile already copied to a remote node with the given args
static NodeStepResult executeRemoteScript(ExecutionContext context, Framework framework, INodeEntry node, java.lang.String[] args, java.lang.String filepath, java.lang.String scriptInterpreter, boolean interpreterargsquoted)
          Execute a scriptfile already copied to a remote node with the given args
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_IMPLEMENTATION_NAME

public static final java.lang.String SERVICE_IMPLEMENTATION_NAME
See Also:
Constant Field Values
Constructor Detail

ScriptFileNodeStepExecutor

public ScriptFileNodeStepExecutor(Framework framework)
Method Detail

executeNodeStep

public NodeStepResult executeNodeStep(StepExecutionContext context,
                                      NodeStepExecutionItem item,
                                      INodeEntry node)
                               throws NodeStepException
Description copied from interface: NodeStepExecutor
Execute the step

Specified by:
executeNodeStep in interface NodeStepExecutor
Throws:
NodeStepException

executeRemoteScript

public static NodeStepResult executeRemoteScript(ExecutionContext context,
                                                 Framework framework,
                                                 INodeEntry node,
                                                 java.lang.String[] args,
                                                 java.lang.String filepath)
                                          throws NodeStepException
Execute a scriptfile already copied to a remote node with the given args

Parameters:
context - context
framework - framework
node - the node
args - arguments to script
filepath - the remote path for the script
Throws:
NodeStepException

executeRemoteScript

public static NodeStepResult executeRemoteScript(ExecutionContext context,
                                                 Framework framework,
                                                 INodeEntry node,
                                                 java.lang.String[] args,
                                                 java.lang.String filepath,
                                                 java.lang.String scriptInterpreter,
                                                 boolean interpreterargsquoted)
                                          throws NodeStepException
Execute a scriptfile already copied to a remote node with the given args

Parameters:
context - context
framework - framework
node - the node
args - arguments to script
filepath - the remote path for the script
scriptInterpreter - interpreter used to invoke the script
interpreterargsquoted - if true, pass the file and script args as a single argument to the interpreter
Throws:
NodeStepException