hudson.plugins.clearcase
Class HudsonClearToolLauncher

java.lang.Object
  extended by hudson.plugins.clearcase.HudsonClearToolLauncher
All Implemented Interfaces:
ClearToolLauncher

public class HudsonClearToolLauncher
extends java.lang.Object
implements ClearToolLauncher

Class for executing the cleartool commands in the Hudson instance.


Constructor Summary
HudsonClearToolLauncher(java.lang.String executable, java.lang.String scmName, hudson.model.TaskListener listener, hudson.FilePath workspace, hudson.Launcher launcher)
           
 
Method Summary
 java.lang.String getCmdString(java.lang.String[] cmd)
           
 hudson.Proc getLaunchedProc(java.lang.String[] cmdWithExec, java.lang.String[] env, java.io.InputStream inputStream, java.io.OutputStream out, hudson.FilePath path)
           
 hudson.Launcher getLauncher()
          
 hudson.model.TaskListener getListener()
          Returns a task listener for a hudson job
 hudson.FilePath getWorkspace()
          Returns the workspace file path for a hudson job
 boolean run(java.lang.String[] cmd, hudson.FilePath filePath)
          Launches a cleartool command with arguments.
 boolean run(java.lang.String[] cmd, java.io.InputStream inputStream, java.io.OutputStream outputStream, hudson.FilePath filePath)
          Launches a cleartool command with arguments.
 boolean run(java.lang.String[] cmd, java.io.InputStream inputStream, java.io.OutputStream outputStream, hudson.FilePath filePath, boolean logCommand)
          Launches a cleartool command with arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HudsonClearToolLauncher

public HudsonClearToolLauncher(java.lang.String executable,
                               java.lang.String scmName,
                               hudson.model.TaskListener listener,
                               hudson.FilePath workspace,
                               hudson.Launcher launcher)
Method Detail

getListener

public hudson.model.TaskListener getListener()
Description copied from interface: ClearToolLauncher
Returns a task listener for a hudson job

Specified by:
getListener in interface ClearToolLauncher
Returns:
a task listener

getWorkspace

public hudson.FilePath getWorkspace()
Description copied from interface: ClearToolLauncher
Returns the workspace file path for a hudson job

Specified by:
getWorkspace in interface ClearToolLauncher
Returns:
the workspace file path

run

public boolean run(java.lang.String[] cmd,
                   hudson.FilePath filePath)
            throws java.io.IOException,
                   java.lang.InterruptedException
Description copied from interface: ClearToolLauncher
Launches a cleartool command with arguments.

Specified by:
run in interface ClearToolLauncher
Parameters:
cmd - the command to launch using the clear tool executable
Returns:
execPath optional, the path where the command should be launched
Throws:
java.io.IOException
java.lang.InterruptedException

run

public boolean run(java.lang.String[] cmd,
                   java.io.InputStream inputStream,
                   java.io.OutputStream outputStream,
                   hudson.FilePath filePath)
            throws java.io.IOException,
                   java.lang.InterruptedException
Description copied from interface: ClearToolLauncher
Launches a cleartool command with arguments.

Specified by:
run in interface ClearToolLauncher
Parameters:
cmd - the command to launch using the clear tool executable
inputStream - optional, if the command should be able to receive input
outputStream - optional, can be used to gather the output stream
filePath - optional, the path where the command should be launched
Returns:
true if the command was successful, false otherwise
Throws:
java.io.IOException
java.lang.InterruptedException

run

public boolean run(java.lang.String[] cmd,
                   java.io.InputStream inputStream,
                   java.io.OutputStream outputStream,
                   hudson.FilePath filePath,
                   boolean logCommand)
            throws java.io.IOException,
                   java.lang.InterruptedException
Description copied from interface: ClearToolLauncher
Launches a cleartool command with arguments.

Specified by:
run in interface ClearToolLauncher
Parameters:
cmd - the command to launch using the clear tool executable
inputStream - optional, if the command should be able to receive input
outputStream - optional, can be used to gather the output stream
filePath - optional, the path where the command should be launched
logCommand - optional, log the command itself
Returns:
true if the command was successful, false otherwise
Throws:
java.io.IOException
java.lang.InterruptedException

getLauncher

public hudson.Launcher getLauncher()

Specified by:
getLauncher in interface ClearToolLauncher
Returns:
the Hudsonlauncher
See Also:
ClearToolLauncher.getLauncher()

getLaunchedProc

public hudson.Proc getLaunchedProc(java.lang.String[] cmdWithExec,
                                   java.lang.String[] env,
                                   java.io.InputStream inputStream,
                                   java.io.OutputStream out,
                                   hudson.FilePath path)
                            throws java.io.IOException
Throws:
java.io.IOException

getCmdString

public java.lang.String getCmdString(java.lang.String[] cmd)
Specified by:
getCmdString in interface ClearToolLauncher


Copyright © 2010. All Rights Reserved.