net.sourceforge.cruisecontrol.bootstrappers
Class AllFusionHarvestBootstrapper

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

public class AllFusionHarvestBootstrapper
extends java.lang.Object
implements Bootstrapper

BootStrapper for CA's AllFusion Harvest Change Manager. This BootStrapper class is used to connect to Harvest to retrieve files before the build is started. It has a number of properties which must be set in order to connect to Harvest. It also provides a mechanism to pipe Harvest errors through into the CruiseControl log.

Author:
Trinem Consulting Ltd
See Also:
Serialized Form

Nested Class Summary
 class AllFusionHarvestBootstrapper.MyLogStreamListener
          Simple LogStream Listener class which interprets the message serverity level of Harvest messages and reports them to the CruiseControl log.
 
Constructor Summary
AllFusionHarvestBootstrapper()
          Default constructor.
 
Method Summary
 void bootstrap()
          Update the specified file.
protected  boolean login()
          Internal method which connects to Harvest using the details provided.
protected  void logout()
          Internal method which disconnects from Harvest.
 void setBroker(java.lang.String broker)
          Sets the Harvest Broker for all calls to HSDK.
 void setClientpath(java.lang.String clientPath)
          Sets the client path to use when making calls to HSDK.
 void setFile(java.lang.String filename)
          Sets the filename to update.
 void setPassword(java.lang.String password)
          Sets the Harvest password for all calls to HSDK.
 void setProcess(java.lang.String process)
          Sets the name of the process to use when making calls to HSDK.
 void setProject(java.lang.String project)
          Sets the Harvest project for all calls to HSDK.
 void setState(java.lang.String state)
          Sets the Harvest state for all calls to HSDK.
 void setUsername(java.lang.String username)
          Sets the Harvest username for all calls to HSDK.
 void setViewpath(java.lang.String viewPath)
          Sets the view path to use when making calls to HSDK.
 void validate()
          Standard Bootstrapper validation method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllFusionHarvestBootstrapper

public AllFusionHarvestBootstrapper()
Default constructor. Creates a new uninitialise Bootstrapper.

Method Detail

setBroker

public void setBroker(java.lang.String broker)
Sets the Harvest Broker for all calls to HSDK.

Parameters:
broker - Harvest Broker to use.

setUsername

public void setUsername(java.lang.String username)
Sets the Harvest username for all calls to HSDK.

Parameters:
username - Harvest username to use.

setPassword

public void setPassword(java.lang.String password)
Sets the Harvest password for all calls to HSDK.

Parameters:
password - Harvest password to use.

setProject

public void setProject(java.lang.String project)
Sets the Harvest project for all calls to HSDK.

Parameters:
project - Harvest project to use.

setState

public void setState(java.lang.String state)
Sets the Harvest state for all calls to HSDK.

Parameters:
state - Harvest state to use.

setProcess

public void setProcess(java.lang.String process)
Sets the name of the process to use when making calls to HSDK.

Parameters:
process - String indicating the process name.

setViewpath

public void setViewpath(java.lang.String viewPath)
Sets the view path to use when making calls to HSDK.

Parameters:
viewPath - String indicating the view path.

setClientpath

public void setClientpath(java.lang.String clientPath)
Sets the client path to use when making calls to HSDK.

Parameters:
clientPath - String indicating the client path.

setFile

public void setFile(java.lang.String filename)
Sets the filename to update.

Parameters:
filename - String indicating the filename.

login

protected boolean login()
Internal method which connects to Harvest using the details provided.


logout

protected void logout()
Internal method which disconnects from Harvest.


validate

public void validate()
              throws CruiseControlException
Standard Bootstrapper validation method. Throws an exception if any of the required properties are not set.

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

bootstrap

public void bootstrap()
Update the specified file.

Specified by:
bootstrap in interface Bootstrapper