jetbrains.buildServer.agent.runner
Class SimpleProgramCommandLine

java.lang.Object
  extended by jetbrains.buildServer.agent.runner.SimpleProgramCommandLine
All Implemented Interfaces:
ProgramCommandLine

public class SimpleProgramCommandLine
extends java.lang.Object
implements ProgramCommandLine

Base implementation for ProgramCommandLine


Constructor Summary
SimpleProgramCommandLine(AgentRunningBuild build, java.lang.String executablePath, java.util.List<java.lang.String> arguments)
          Deprecated. Use BuildServiceAdapter.createProgramCommandline(String, java.util.List)
SimpleProgramCommandLine(BuildRunnerContext runner, java.lang.String executablePath, java.util.List<java.lang.String> arguments)
           
SimpleProgramCommandLine(java.util.Map<java.lang.String,java.lang.String> env, java.lang.String workingDir, java.lang.String executablePath, java.util.List<java.lang.String> arguments)
           
 
Method Summary
 java.util.List<java.lang.String> getArguments()
          All quotations are done property inside Java Runtime
 java.util.Map<java.lang.String,java.lang.String> getEnvironment()
           
 java.lang.String getExecutablePath()
          Returns either full pathrelative path to working dirsimply command name to be resolved by OS on the build agent to run
 java.lang.String getWorkingDirectory()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleProgramCommandLine

@Deprecated
public SimpleProgramCommandLine(@NotNull
                                           AgentRunningBuild build,
                                           @NotNull
                                           java.lang.String executablePath,
                                           @NotNull
                                           java.util.List<java.lang.String> arguments)
Deprecated. Use BuildServiceAdapter.createProgramCommandline(String, java.util.List)

Parameters:
build -
executablePath -
arguments -

SimpleProgramCommandLine

public SimpleProgramCommandLine(@NotNull
                                BuildRunnerContext runner,
                                @NotNull
                                java.lang.String executablePath,
                                @NotNull
                                java.util.List<java.lang.String> arguments)

SimpleProgramCommandLine

public SimpleProgramCommandLine(@NotNull
                                java.util.Map<java.lang.String,java.lang.String> env,
                                @NotNull
                                java.lang.String workingDir,
                                @NotNull
                                java.lang.String executablePath,
                                @NotNull
                                java.util.List<java.lang.String> arguments)
Method Detail

getExecutablePath

@NotNull
public java.lang.String getExecutablePath()
                                   throws RunBuildException
Description copied from interface: ProgramCommandLine
Returns either to run

Specified by:
getExecutablePath in interface ProgramCommandLine
Returns:
file path to execute
Throws:
RunBuildException - on error in parameters or agent's machine environment

getWorkingDirectory

@NotNull
public java.lang.String getWorkingDirectory()
Specified by:
getWorkingDirectory in interface ProgramCommandLine
Returns:
executable working directory either relative on build checkout directory or absolute path

getArguments

@NotNull
public java.util.List<java.lang.String> getArguments()
                                              throws RunBuildException
Description copied from interface: ProgramCommandLine
All quotations are done property inside Java Runtime

Specified by:
getArguments in interface ProgramCommandLine
Returns:
arguments to be sent to process
Throws:
RunBuildException - on error in parameters or agent's machine environment

getEnvironment

@NotNull
public java.util.Map<java.lang.String,java.lang.String> getEnvironment()
Specified by:
getEnvironment in interface ProgramCommandLine
Returns:
map of all environment variables to be set for process