Interface ScriptFileNodeStepUtils
-
- All Known Implementing Classes:
DefaultScriptFileNodeStepUtils
public interface ScriptFileNodeStepUtilsCreated by greg on 7/15/16.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NodeStepResultexecuteRemoteScript(ExecutionContext context, IFramework framework, INodeEntry node, java.lang.String[] args, java.lang.String filepath)Execute a scriptfile already copied to a remote node with the given argsNodeStepResultexecuteRemoteScript(ExecutionContext context, IFramework 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 argsNodeStepResultexecuteRemoteScript(ExecutionContext context, IFramework framework, INodeEntry node, java.lang.String[] args, java.lang.String filepath, java.lang.String scriptInterpreter, boolean interpreterargsquoted, boolean removeFile)Execute a scriptfile already copied to a remote node with the given argsNodeStepResultexecuteRemoteScript(ExecutionContext context, IFramework framework, INodeEntry node, java.lang.String[] args, java.lang.String filepath, java.lang.String scriptInterpreter, boolean interpreterargsquoted, boolean removeFile, java.io.InputStream inputStream)Execute a scriptfile already copied to a remote node with the given argsNodeStepResultexecuteRemoteScript(ExecutionContext context, IFramework framework, INodeEntry node, java.lang.String[] args, java.lang.String filepath, java.lang.String scriptInterpreter, boolean interpreterargsquoted, java.io.InputStream inputStream)Execute a scriptfile already copied to a remote node with the given argsNodeStepResultexecuteScriptFile(StepExecutionContext context, INodeEntry node, java.lang.String scriptString, java.lang.String serverScriptFilePath, java.io.InputStream scriptAsStream, java.lang.String fileExtension, java.lang.String[] args, java.lang.String scriptInterpreter, boolean quoted, NodeExecutionService executionService, boolean expandTokens)Execute a script on a remote nodeNodeStepResultexecuteScriptFile(StepExecutionContext context, INodeEntry node, java.lang.String scriptString, java.lang.String serverScriptFilePath, java.io.InputStream scriptAsStream, java.lang.String fileExtension, java.lang.String[] args, java.lang.String scriptInterpreter, java.io.InputStream inputStream, boolean quoted, NodeExecutionService executionService, boolean expandTokens, FileCopierUtil.ContentModifier modifier)Execute a script on a remote nodeExecArgListremoveArgsForOsFamily(java.lang.String filepath, java.lang.String osFamily)Return ExecArgList for removing a file for the given OS familyjava.io.FilewriteScriptToTempFile(StepExecutionContext context, INodeEntry node, java.lang.String scriptString, java.lang.String serverScriptFilePath, java.io.InputStream scriptAsStream, boolean expandTokens)Copy the script input to a temp file and expand embedded tokens, if it is a string or inputstream.java.io.FilewriteScriptToTempFile(StepExecutionContext context, INodeEntry node, java.lang.String scriptString, java.lang.String serverScriptFilePath, java.io.InputStream scriptAsStream, boolean expandTokens, FileCopierUtil.ContentModifier scriptModifierUtil)Copy the script input to a temp file and expand embedded tokens, if it is a string or inputstream.
-
-
-
Method Detail
-
executeScriptFile
NodeStepResult executeScriptFile(StepExecutionContext context, INodeEntry node, java.lang.String scriptString, java.lang.String serverScriptFilePath, java.io.InputStream scriptAsStream, java.lang.String fileExtension, java.lang.String[] args, java.lang.String scriptInterpreter, boolean quoted, NodeExecutionService executionService, boolean expandTokens) throws NodeStepException
Execute a script on a remote node- Parameters:
context- contextnode- nodescriptString- stringserverScriptFilePath- filescriptAsStream- streamfileExtension- file extensionargs- script argsscriptInterpreter- invoker stringquoted- true if args are quotedexecutionService- service- Returns:
- execution result
- Throws:
NodeStepException- on error
-
executeScriptFile
NodeStepResult executeScriptFile(StepExecutionContext context, INodeEntry node, java.lang.String scriptString, java.lang.String serverScriptFilePath, java.io.InputStream scriptAsStream, java.lang.String fileExtension, java.lang.String[] args, java.lang.String scriptInterpreter, java.io.InputStream inputStream, boolean quoted, NodeExecutionService executionService, boolean expandTokens, FileCopierUtil.ContentModifier modifier) throws NodeStepException
Execute a script on a remote node- Parameters:
context- contextnode- nodescriptString- stringserverScriptFilePath- filescriptAsStream- streamfileExtension- file extensionargs- script argsscriptInterpreter- invoker stringinputStream- inputstream to send to the scriptquoted- true if args are quotedexecutionService- service- Returns:
- execution result
- Throws:
NodeStepException- on error
-
writeScriptToTempFile
java.io.File writeScriptToTempFile(StepExecutionContext context, INodeEntry node, java.lang.String scriptString, java.lang.String serverScriptFilePath, java.io.InputStream scriptAsStream, boolean expandTokens) throws FileCopierException
Copy the script input to a temp file and expand embedded tokens, if it is a string or inputstream. If it is a local file, use the original without modification- Parameters:
context- contextnode- nodescriptString- stringserverScriptFilePath- filescriptAsStream- stream- Returns:
- temp file
- Throws:
FileCopierException- on error
-
writeScriptToTempFile
java.io.File writeScriptToTempFile(StepExecutionContext context, INodeEntry node, java.lang.String scriptString, java.lang.String serverScriptFilePath, java.io.InputStream scriptAsStream, boolean expandTokens, FileCopierUtil.ContentModifier scriptModifierUtil) throws FileCopierException
Copy the script input to a temp file and expand embedded tokens, if it is a string or inputstream. If it is a local file, use the original without modification- Parameters:
context- contextnode- nodescriptString- stringserverScriptFilePath- filescriptAsStream- stream- Returns:
- temp file
- Throws:
FileCopierException- on error
-
executeRemoteScript
NodeStepResult executeRemoteScript(ExecutionContext context, IFramework 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- contextframework- frameworknode- the nodeargs- arguments to scriptfilepath- the remote path for the script- Returns:
- the result
- Throws:
NodeStepException- on error
-
executeRemoteScript
NodeStepResult executeRemoteScript(ExecutionContext context, IFramework 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- contextframework- frameworknode- the nodeargs- arguments to scriptfilepath- the remote path for the scriptscriptInterpreter- interpreter used to invoke the scriptinterpreterargsquoted- if true, pass the file and script args as a single argument to the interpreter- Returns:
- result
- Throws:
NodeStepException- on error
-
executeRemoteScript
NodeStepResult executeRemoteScript(ExecutionContext context, IFramework framework, INodeEntry node, java.lang.String[] args, java.lang.String filepath, java.lang.String scriptInterpreter, boolean interpreterargsquoted, java.io.InputStream inputStream) throws NodeStepException
Execute a scriptfile already copied to a remote node with the given args- Parameters:
context- contextframework- frameworknode- the nodeargs- arguments to scriptfilepath- the remote path for the scriptscriptInterpreter- interpreter used to invoke the scriptinterpreterargsquoted- if true, pass the file and script args as a single argument to the interpreterinputStream- input to send to the script- Returns:
- result
- Throws:
NodeStepException- on error
-
executeRemoteScript
NodeStepResult executeRemoteScript(ExecutionContext context, IFramework framework, INodeEntry node, java.lang.String[] args, java.lang.String filepath, java.lang.String scriptInterpreter, boolean interpreterargsquoted, boolean removeFile) throws NodeStepException
Execute a scriptfile already copied to a remote node with the given args- Parameters:
context- contextframework- frameworknode- the nodeargs- arguments to scriptfilepath- the remote path for the scriptscriptInterpreter- interpreter used to invoke the scriptinterpreterargsquoted- if true, pass the file and script args as a single argument to the interpreterremoveFile- if true, remove the file after execution- Returns:
- result
- Throws:
NodeStepException- on error
-
executeRemoteScript
NodeStepResult executeRemoteScript(ExecutionContext context, IFramework framework, INodeEntry node, java.lang.String[] args, java.lang.String filepath, java.lang.String scriptInterpreter, boolean interpreterargsquoted, boolean removeFile, java.io.InputStream inputStream) throws NodeStepException
Execute a scriptfile already copied to a remote node with the given args- Parameters:
context- contextframework- frameworknode- the nodeargs- arguments to scriptfilepath- the remote path for the scriptscriptInterpreter- interpreter used to invoke the scriptinterpreterargsquoted- if true, pass the file and script args as a single argument to the interpreterremoveFile- if true, remove the file after executioninputStream- input to send to the script- Returns:
- result
- Throws:
NodeStepException- on error
-
removeArgsForOsFamily
ExecArgList removeArgsForOsFamily(java.lang.String filepath, java.lang.String osFamily)
Return ExecArgList for removing a file for the given OS family- Parameters:
filepath- pathosFamily- family- Returns:
- arg list
-
-