| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.bamboo.command.Command
public abstract class Command
This class executes a command line command.
| Field Summary | |
|---|---|
protected  BuildLoggerManager | 
buildLoggerManager
 | 
protected  CustomVariableContext | 
customVariableContext
 | 
| 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.  | 
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 | 
setCustomVariableContext(CustomVariableContext customVariableContext)
 | 
 void | 
setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected BuildLoggerManager buildLoggerManager
protected CustomVariableContext customVariableContext
| 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 - Failure
protected void decorateCommandLine(org.apache.tools.ant.types.Commandline commandline,
                                   BuildContext context)
@Nullable protected java.lang.String[] getCustomEnvironmentVars(ReadOnlyCapabilitySet capabilitySet)
public java.lang.String[] getEnvironmentSetting(@Nullable
                                                java.lang.String vmParams,
                                                @Nullable
                                                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 setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
public BuildLoggerManager getBuildLoggerManager()
public void setCustomVariableContext(CustomVariableContext customVariableContext)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||