|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.command.Command
public abstract class Command
This class executes a command line command.
Field Summary | |
---|---|
protected BuildLoggerManager |
buildLoggerManager
|
static java.lang.String |
CBD_BUILD_COMMANDLINE
Key name in custom build data |
protected VariableSubstitutionBean |
substitutionBean
|
Constructor Summary | |
---|---|
Command()
|
Method Summary | |
---|---|
protected void |
decorateCommandLine(org.apache.tools.ant.types.Commandline commandline,
BuildContext context)
|
int |
executeCommand(BuildContext buildContext,
CommandExecuteStreamHandler commandExecuteStreamHandler,
java.lang.String extraEnvironmentVariables,
java.lang.String javaHome,
ReadOnlyCapabilitySet capabilitySet)
Execute the command line in a specific directory. |
BuildLoggerManager |
getBuildLoggerManager()
|
java.lang.String[] |
getCommandArguments(ReadOnlyCapabilitySet capabilitySet)
What are the arguments for the command line to execute Variable substitution is not required for the arguments, substitution will be performed later. |
java.lang.String |
getCommandExecutable(ReadOnlyCapabilitySet capabilitySet)
What is the executable for the command line to execute. |
org.apache.tools.ant.types.Commandline |
getCommandLine(ReadOnlyCapabilitySet capabilitySet)
Deprecated. |
protected java.lang.String[] |
getCustomEnvironmentVars(ReadOnlyCapabilitySet capabilitySet)
|
java.lang.String[] |
getEnvironmentSetting(java.lang.String vmParams,
java.lang.String javaHome)
Returns the environment settings. |
org.apache.tools.ant.types.Commandline |
getSubstitutedCommandLine(BuildContext buildContext,
BuildLogger buildLogger,
ReadOnlyCapabilitySet capabilitySet)
Get the command line provided by implementing class and provides variable substitution. |
VariableSubstitutionBean |
getVariableSubstitutionBean()
|
abstract java.io.File |
getWorkingDirectory()
Where should the command be executed? |
protected boolean |
isWindowsPlatform()
Is the server running on the Windows platform? |
void |
setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
|
void |
setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
|
void |
setVariableSubstitutionBean(VariableSubstitutionBean substitutionBean)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected VariableSubstitutionBean substitutionBean
protected BuildLoggerManager buildLoggerManager
public static final java.lang.String CBD_BUILD_COMMANDLINE
Constructor Detail |
---|
public Command()
Method Detail |
---|
public int executeCommand(@NotNull BuildContext buildContext, @NotNull CommandExecuteStreamHandler commandExecuteStreamHandler, java.lang.String extraEnvironmentVariables, java.lang.String javaHome, ReadOnlyCapabilitySet capabilitySet) throws CommandException
buildContext
- The BuildContext for the current buildcommandExecuteStreamHandler
- Stream Handler for the output of the execute commandextraEnvironmentVariables
- environment variable additional to those already in the env (e.g provided by the user via UI)javaHome
- The java home value for this commandcapabilitySet
- Capability set
CommandException
- Failureprotected void decorateCommandLine(org.apache.tools.ant.types.Commandline commandline, BuildContext context)
@Nullable protected java.lang.String[] getCustomEnvironmentVars(ReadOnlyCapabilitySet capabilitySet)
public java.lang.String[] getEnvironmentSetting(java.lang.String vmParams, java.lang.String javaHome)
vmParams
- build specific settingsjavaHome
- value for JAVA_HOME env setting
@NotNull public org.apache.tools.ant.types.Commandline getSubstitutedCommandLine(BuildContext buildContext, BuildLogger buildLogger, ReadOnlyCapabilitySet capabilitySet)
buildContext
- Containing current build specific informationbuildLogger
- Build specific logger objectcapabilitySet
- Capability set
public abstract java.io.File getWorkingDirectory()
@Deprecated public org.apache.tools.ant.types.Commandline getCommandLine(ReadOnlyCapabilitySet capabilitySet)
capabilitySet
- Capability set
@NotNull public java.lang.String getCommandExecutable(ReadOnlyCapabilitySet capabilitySet)
capabilitySet-
- for the current context
@NotNull public java.lang.String[] getCommandArguments(ReadOnlyCapabilitySet capabilitySet)
capabilitySet
- - for the current context
protected boolean isWindowsPlatform()
public void setVariableSubstitutionBean(VariableSubstitutionBean substitutionBean)
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
public VariableSubstitutionBean getVariableSubstitutionBean()
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
public BuildLoggerManager getBuildLoggerManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |