net.sourceforge.cruisecontrol.sourcecontrols
Class AllFusionHarvestCM511

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.sourcecontrols.AllFusionHarvestCM511
All Implemented Interfaces:
java.io.Serializable, SourceControl

public class AllFusionHarvestCM511
extends java.lang.Object
implements SourceControl

This class implements the SourceControl methods for an AllFusion Harvest CM 5.1.1 repository. The call to AllFusionHarvestCM511 is assumed to work without any setup. This implies that the login parameters are specified in the cc configuration file.

Author:
Larry Liberto

See Also:
libertoenterprises.com/harvest.html, Serialized Form

Constructor Summary
AllFusionHarvestCM511()
           
 
Method Summary
 java.lang.String getBrokerName()
          Gets the broker name for authentication
 java.util.List getModifications(java.util.Date lastBuildTime, java.util.Date now)
          Returns a list of type net.sourceforge.cruisecontrol.Modification detailing all the changes between the last build and the latest revision in the repository.
 java.lang.String getProjectName()
          Gets the project/repository name used to check for modifications.
 java.util.Map getProperties()
          Any properties that have been set in this sourcecontrol.
 java.lang.String getRepositoryName()
          Gets the project/repository name used to check for modifications.
 java.lang.String getStateName()
           
 long getTimeAdjustmentFactor()
          Retrieve the time adjustment factor used to calculate the modification time of an item when the AllFusion Harvest Server times are different then that of the cc Server.
 boolean isDebug()
          Determines whether to display debug information.
static void main(java.lang.String[] args)
          Main method used to test the plug-in.
 void setBrokerName(java.lang.String b)
          Sets the broker name for authentication
 void setDebug(java.lang.String debug)
           
 void setPassword(java.lang.String p)
          Sets the password for authentication.
 void setProjectName(java.lang.String p)
          Sets the project/repository name used to check for modifications.
 void setProperty(java.lang.String p)
           
 void setRepositoryName(java.lang.String r)
          Sets the project/repository name used to check for modifications.
 void setStateName(java.lang.String name)
           
 void setTimeAdjustmentFactor(java.lang.String factor)
          Used to calculate the modification time of an item when the AllFusion Harvest Server times are different then that of the cc Server.
 void setUsername(java.lang.String u)
          Sets the username for authentication.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllFusionHarvestCM511

public AllFusionHarvestCM511()
Method Detail

getStateName

public java.lang.String getStateName()

setStateName

public void setStateName(java.lang.String name)

isDebug

public boolean isDebug()
Determines whether to display debug information.


setDebug

public void setDebug(java.lang.String debug)
Parameters:
debug - true or false to set the debugging level.

getTimeAdjustmentFactor

public long getTimeAdjustmentFactor()
Retrieve the time adjustment factor used to calculate the modification time of an item when the AllFusion Harvest Server times are different then that of the cc Server.

Returns:
Time in milliseconds.

setTimeAdjustmentFactor

public void setTimeAdjustmentFactor(java.lang.String factor)
Used to calculate the modification time of an item when the AllFusion Harvest Server times are different then that of the cc Server.

Parameters:
factor - Time in milliseconds.

setProperty

public void setProperty(java.lang.String p)

setUsername

public void setUsername(java.lang.String u)
Sets the username for authentication.


setPassword

public void setPassword(java.lang.String p)
Sets the password for authentication.


getBrokerName

public java.lang.String getBrokerName()
Gets the broker name for authentication


setBrokerName

public void setBrokerName(java.lang.String b)
Sets the broker name for authentication


getProjectName

public java.lang.String getProjectName()
Gets the project/repository name used to check for modifications.


setProjectName

public void setProjectName(java.lang.String p)
Sets the project/repository name used to check for modifications.


getRepositoryName

public java.lang.String getRepositoryName()
Gets the project/repository name used to check for modifications.


setRepositoryName

public void setRepositoryName(java.lang.String r)
Sets the project/repository name used to check for modifications.


validate

public void validate()
              throws CruiseControlException
Specified by:
validate in interface SourceControl
Throws:
CruiseControlException - Thrown when the brokerName, userName, password or projectName are null

getModifications

public java.util.List getModifications(java.util.Date lastBuildTime,
                                       java.util.Date now)
Returns a list of type net.sourceforge.cruisecontrol.Modification detailing all the changes between the last build and the latest revision in the repository.

Specified by:
getModifications in interface SourceControl
Parameters:
lastBuildTime - Date representing the last time the build executed.
now - Date representing the current system time (i.e. the cc server system time).
Returns:
List of type net.sourceforge.cruisecontrol.Modification, or an empty list if we failed to retrieve the changes.

main

public static void main(java.lang.String[] args)
Main method used to test the plug-in.

Parameters:
args - String[] array containing all commandline arguments.

getProperties

public java.util.Map getProperties()
Description copied from interface: SourceControl
Any properties that have been set in this sourcecontrol. Will be passed onto the Builder, which may then pass the properties to the underlying build implementation. For example, the Ant builder will define these properties so that the underlying Ant script can use them.

Specified by:
getProperties in interface SourceControl