net.sourceforge.cruisecontrol.sourcecontrols
Class PlasticSCM

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

public class PlasticSCM
extends java.lang.Object
implements SourceControl

This class implements the SourceControl class for a Plastic SCM repository.

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

Field Summary
static java.lang.String DATEFORMAT
           
static java.lang.String DELIMITER
           
static java.lang.String QUERYFORMAT
           
 
Constructor Summary
PlasticSCM()
           
 
Method Summary
protected  Commandline buildFindCommand(java.util.Date lastBuild, java.util.Date now)
          Build the Plastic SCM find command.
 java.util.List getModifications(java.util.Date lastBuild, java.util.Date now)
          Returns an List of Modifications detailing all the changes between now and the last build.
 java.util.Map getProperties()
          Any properties that have been set in this sourcecontrol.
protected  java.util.List parseStream(java.io.InputStream input)
          Parse the find command output.
 void setBranch(java.lang.String branch)
          Selects a branch
 void setProperty(java.lang.String property)
           
 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
 

Field Detail

DATEFORMAT

public static final java.lang.String DATEFORMAT
See Also:
Constant Field Values

DELIMITER

public static final java.lang.String DELIMITER
See Also:
Constant Field Values

QUERYFORMAT

public static final java.lang.String QUERYFORMAT
See Also:
Constant Field Values
Constructor Detail

PlasticSCM

public PlasticSCM()
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 in which changes will be looked for.

setRepository

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

Parameters:
repository - the repository in which changes will be looked for.

setProperty

public void setProperty(java.lang.String property)

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

validate

public void validate()
              throws CruiseControlException
Validate the attributes.

Specified by:
validate in interface SourceControl
Throws:
CruiseControlException

getModifications

public java.util.List getModifications(java.util.Date lastBuild,
                                       java.util.Date now)
Returns an List of Modifications detailing all the changes between now and the last build.

Specified by:
getModifications in interface SourceControl
Parameters:
lastBuild - the last build time
now - time now, or time to check
Returns:
the list of modifications, an empty (not null) list if no modifications or if developer had checked in files since quietPeriod seconds ago.

buildFindCommand

protected Commandline buildFindCommand(java.util.Date lastBuild,
                                       java.util.Date now)
                                throws CruiseControlException
Build the Plastic SCM find command.

Throws:
CruiseControlException

parseStream

protected java.util.List parseStream(java.io.InputStream input)
                              throws java.io.IOException,
                                     java.text.ParseException
Parse the find command output.

Throws:
java.io.IOException
java.text.ParseException