Class ScriptConfig
- java.lang.Object
-
- com.atlassian.bamboo.plugins.script.task.ScriptConfig
-
- All Implemented Interfaces:
ShellConfig
public class ScriptConfig extends Object implements ShellConfig
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScriptConfig.Interpreter
static class
ScriptConfig.ScriptLocation
-
Field Summary
Fields Modifier and Type Field Description static String
CFG_ARGUMENT
static String
CFG_ENVIRONMENT_VARIABLES
static String
CFG_INTERPRETER
static String
CFG_SCRIPT_BODY
static String
CFG_SCRIPT_FILE
static String
CFG_SCRIPT_LOCATION_TYPE
static String
DEFAULT_UNIX_EXECUTOR
-
Constructor Summary
Constructors Constructor Description ScriptConfig(@NotNull CommonTaskContext taskContext, @NotNull EnvironmentVariableAccessor environmentVariableAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getCommandline()
Map<String,String>
getExtraEnvironment()
ScriptConfig.Interpreter
getInterpreter()
String
getScriptBody()
String
getScriptFilename()
ScriptConfig.ScriptLocation
getScriptLocation()
File
getWorkingDirectory()
boolean
isRunAsExecutable()
boolean
isRunWithPowershell()
void
setScriptFilename(String scriptFilename)
protected String
wrapPowershellCommandIfNecessary(String absolutePath)
-
-
-
Field Detail
-
CFG_SCRIPT_FILE
public static final String CFG_SCRIPT_FILE
- See Also:
- Constant Field Values
-
CFG_ARGUMENT
public static final String CFG_ARGUMENT
- See Also:
- Constant Field Values
-
CFG_SCRIPT_BODY
public static final String CFG_SCRIPT_BODY
- See Also:
- Constant Field Values
-
CFG_INTERPRETER
public static final String CFG_INTERPRETER
- See Also:
- Constant Field Values
-
CFG_SCRIPT_LOCATION_TYPE
public static final String CFG_SCRIPT_LOCATION_TYPE
- See Also:
- Constant Field Values
-
CFG_ENVIRONMENT_VARIABLES
public static final String CFG_ENVIRONMENT_VARIABLES
- See Also:
- Constant Field Values
-
DEFAULT_UNIX_EXECUTOR
public static final String DEFAULT_UNIX_EXECUTOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ScriptConfig
public ScriptConfig(@NotNull @NotNull CommonTaskContext taskContext, @NotNull @NotNull EnvironmentVariableAccessor environmentVariableAccessor)
-
-
Method Detail
-
wrapPowershellCommandIfNecessary
protected String wrapPowershellCommandIfNecessary(String absolutePath)
-
getCommandline
public List<String> getCommandline()
- Specified by:
getCommandline
in interfaceShellConfig
-
getScriptLocation
public ScriptConfig.ScriptLocation getScriptLocation()
-
getInterpreter
public ScriptConfig.Interpreter getInterpreter()
-
getScriptFilename
public String getScriptFilename()
-
setScriptFilename
public void setScriptFilename(String scriptFilename)
-
getScriptBody
public String getScriptBody()
-
getExtraEnvironment
public Map<String,String> getExtraEnvironment()
- Specified by:
getExtraEnvironment
in interfaceShellConfig
-
getWorkingDirectory
public File getWorkingDirectory()
- Specified by:
getWorkingDirectory
in interfaceShellConfig
-
isRunWithPowershell
public boolean isRunWithPowershell()
- Specified by:
isRunWithPowershell
in interfaceShellConfig
-
isRunAsExecutable
public boolean isRunAsExecutable()
-
-