net.sourceforge.cruisecontrol.bootstrappers
Class ClearCaseViewstrapper

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.bootstrappers.ClearCaseViewstrapper
All Implemented Interfaces:
Bootstrapper, java.io.Serializable

public class ClearCaseViewstrapper
extends java.lang.Object
implements Bootstrapper

This class allows you to start up ClearCase dynamic views and mount VOBs before you initiate your build. If your view has been stopped, a VOB unmounted or your machine rebooted, the likelihood is that your build will fail when using dynamic views. The class therefore allows you to specify a viewpath, from which it works out the view tag and starts it, optionally you can specify voblist, a comma separated list of VOBs to mount. The reason a viewpath is used rather than just the view path is that you can reuse a CruiseControl property which defines the source of your build. You should always specify the viewpath via the root location, i.e. M:\... on Windows or /view/... on Unix Usage: <clearcaseviewstrapper viewpath="M:\dynamic_view\some_vob\src" voblist="\SourceVOB,\ReleaseVOB"/%gt;

Author:
Kevin Lee
See Also:
Serialized Form

Constructor Summary
ClearCaseViewstrapper()
           
 
Method Summary
 void bootstrap()
          start the specified view and VOBs.
protected  Commandline buildListVOBCommand(java.lang.String f)
          build a command line to list (ls) a file/folder
protected  Commandline buildMountVOBCommand(java.lang.String vob)
          build a command line for starting a VOB
protected  Commandline buildStartViewCommand()
          build a command line for starting the view
protected  boolean isWindows()
           
 void setViewpath(java.lang.String path)
          set the path to the view to be started
 void setVoblist(java.lang.String list)
          set the list of VOBs to mount, the list is comma separated
 void validate()
          check whether the appropriate attributes have been set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClearCaseViewstrapper

public ClearCaseViewstrapper()
Method Detail

setViewpath

public void setViewpath(java.lang.String path)
set the path to the view to be started

Parameters:
path - path to view to be started

setVoblist

public void setVoblist(java.lang.String list)
set the list of VOBs to mount, the list is comma separated

Parameters:
list - comma separated list of VOBs to mount

bootstrap

public void bootstrap()
               throws CruiseControlException
start the specified view and VOBs.

Specified by:
bootstrap in interface Bootstrapper
Throws:
CruiseControlException - if bootstrap fails

validate

public void validate()
              throws CruiseControlException
check whether the appropriate attributes have been set

Specified by:
validate in interface Bootstrapper
Throws:
CruiseControlException - if there was a configuration error.

buildStartViewCommand

protected Commandline buildStartViewCommand()
build a command line for starting the view


buildMountVOBCommand

protected Commandline buildMountVOBCommand(java.lang.String vob)
build a command line for starting a VOB


buildListVOBCommand

protected Commandline buildListVOBCommand(java.lang.String f)
build a command line to list (ls) a file/folder


isWindows

protected boolean isWindows()