net.sourceforge.cruisecontrol.sourcecontrols
Class SVN

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

public class SVN
extends java.lang.Object
implements SourceControl

This class implements the SourceControl methods for a Subversion repository. The call to Subversion is assumed to work without any setup. This implies that either authentication data must be available or the login parameters are specified in the cc configuration file. Note: You can also observe for changes a Subversion repository that you have not checked out locally.

Author:
Etienne Studer
See Also:
subversion.tigris.org, Serialized Form

Constructor Summary
SVN()
           
 
Method Summary
 java.util.List getModifications(java.util.Date lastBuild, java.util.Date now)
          Returns a list of modifications detailing all the changes between the last build and the latest revision in the repository.
static java.text.DateFormat getOutDateFormatter()
           
 java.util.Map getProperties()
          Any properties that have been set in this sourcecontrol.
 void setCheckExternals(boolean value)
          Sets whether externals used by the project should also be checked for modifications.
 void setLocalWorkingCopy(java.lang.String localWorkingCopy)
          Sets the local working copy to use when making calls to Subversion.
 void setPassword(java.lang.String password)
          Sets the password for authentication.
 void setProperty(java.lang.String property)
           
 void setPropertyOnDelete(java.lang.String propertyOnDelete)
           
 void setRepositoryLocation(java.lang.String repositoryLocation)
          Sets the repository location to use when making calls to Subversion.
 void setUsername(java.lang.String userName)
          Sets the username for authentication.
 void validate()
          This method validates that at least the repository location or the local working copy location has been specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVN

public SVN()
Method Detail

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

setProperty

public void setProperty(java.lang.String property)

setPropertyOnDelete

public void setPropertyOnDelete(java.lang.String propertyOnDelete)

setCheckExternals

public void setCheckExternals(boolean value)
Sets whether externals used by the project should also be checked for modifications.


setRepositoryLocation

public void setRepositoryLocation(java.lang.String repositoryLocation)
Sets the repository location to use when making calls to Subversion.

Parameters:
repositoryLocation - String indicating the url to the Subversion repository on which to find the log history.

setLocalWorkingCopy

public void setLocalWorkingCopy(java.lang.String localWorkingCopy)
Sets the local working copy to use when making calls to Subversion.

Parameters:
localWorkingCopy - String indicating the relative or absolute path to the local working copy of the Subversion repository of which to find the log history.

setUsername

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


setPassword

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


validate

public void validate()
              throws CruiseControlException
This method validates that at least the repository location or the local working copy location has been specified.

Specified by:
validate in interface SourceControl
Throws:
CruiseControlException - Thrown when the repository location and the local working copy location are both null

getModifications

public java.util.List getModifications(java.util.Date lastBuild,
                                       java.util.Date now)
Returns a list of modifications detailing all the changes between the last build and the latest revision in the repository.

Specified by:
getModifications in interface SourceControl
Parameters:
lastBuild -
now -
Returns:
the list of modifications, or an empty list if we failed to retrieve the changes.

getOutDateFormatter

public static java.text.DateFormat getOutDateFormatter()