Class RgShellScript
- java.lang.Object
-
- org.jenkinsci.plugins.radargun.model.impl.RgShellScript
-
- All Implemented Interfaces:
Serializable
,RgScriptConfig
- Direct Known Subclasses:
NodeShellScript
public abstract class RgShellScript extends Object implements RgScriptConfig
RG shell script base.- Author:
- vjuranek
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
scriptPath
static char
SEP
static String
SHELL_EXEC
-
Constructor Summary
Constructors Constructor Description RgShellScript()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String[]
getInterpreter()
Provides path to interpreter of this script, e.g.String[]
getScriptCmd()
Construct command for executing the script, including script configuration optionsabstract String
getScriptName()
Name of the script, without full path.String
getScriptPath()
String
toString()
RgScriptConfig
withScriptPath(String scriptPath)
-
-
-
Method Detail
-
getScriptName
public abstract String getScriptName()
Description copied from interface:RgScriptConfig
Name of the script, without full path.- Specified by:
getScriptName
in interfaceRgScriptConfig
- Returns:
- Script file name
-
getInterpreter
public String[] getInterpreter()
Description copied from interface:RgScriptConfig
Provides path to interpreter of this script, e.g./bin/bash
, eventually with parameters like/bin/bash -x
. As it can contain also interpreter parameters, it's represented by the array. The first item of the array is always path to interpreter binary.- Specified by:
getInterpreter
in interfaceRgScriptConfig
- Returns:
- Full path to the script interpreter
-
getScriptPath
public String getScriptPath()
- Specified by:
getScriptPath
in interfaceRgScriptConfig
-
withScriptPath
public RgScriptConfig withScriptPath(String scriptPath)
- Specified by:
withScriptPath
in interfaceRgScriptConfig
- Parameters:
scriptPath
- Full path to the script, does include script name itself
-
getScriptCmd
public String[] getScriptCmd()
Description copied from interface:RgScriptConfig
Construct command for executing the script, including script configuration options- Specified by:
getScriptCmd
in interfaceRgScriptConfig
- Returns:
- Script path and its configuration options as an array of strings, each item for one option/parameter
-
-