net.sourceforge.cruisecontrol.bootstrappers
Class PlasticSCMBootstrapper

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

public class PlasticSCMBootstrapper
extends java.lang.Object
implements Bootstrapper

Simply updates the current workspace. Accepts specify branch/repository for the update operation. Do the update forced is an option (false by default).

Author:
Rubén de Alba
See Also:
Serialized Form

Constructor Summary
PlasticSCMBootstrapper()
           
 
Method Summary
 void bootstrap()
          Update the workspace.
protected  Commandline buildSwitchToBranchCommand()
          Build the Plastic SCM switchtobranch command.
protected  Commandline buildUpdateCommand()
          Build the Plastic SCM update command.
 void setBranch(java.lang.String branch)
          Selects a branch
 void setForced(boolean forced)
          Enables/disables the forced update
 void setPathtoupdate(java.lang.String pathtoupdate)
           
 void setRepository(java.lang.String repository)
          Selects a repository
 void setWkspath(java.lang.String wkspath)
          Selects a workspace
 void validate()
          Validate the attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlasticSCMBootstrapper

public PlasticSCMBootstrapper()
Method Detail

setWkspath

public void setWkspath(java.lang.String wkspath)
Selects a workspace

Parameters:
wkspath - the path of the workspace to work in, in the local filesystem

setBranch

public void setBranch(java.lang.String branch)
Selects a branch

Parameters:
branch - the branch from which to get the source.

setRepository

public void setRepository(java.lang.String repository)
Selects a repository

Parameters:
repository - the repository from which to get the source

setPathtoupdate

public void setPathtoupdate(java.lang.String pathtoupdate)

setForced

public void setForced(boolean forced)
Enables/disables the forced update

Parameters:
forced - if true, "cm update" is run whith the "--forced" option

bootstrap

public void bootstrap()
               throws CruiseControlException
Update the workspace.

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

validate

public void validate()
              throws CruiseControlException
Validate the attributes.

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

buildUpdateCommand

protected Commandline buildUpdateCommand()
                                  throws CruiseControlException
Build the Plastic SCM update command.

Throws:
CruiseControlException

buildSwitchToBranchCommand

protected Commandline buildSwitchToBranchCommand()
                                          throws CruiseControlException
Build the Plastic SCM switchtobranch command.

Throws:
CruiseControlException