net.sourceforge.cruisecontrol
Class Modification

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.Modification
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Direct Known Subclasses:
ClearCaseModification, CMSynergyModification

public class Modification
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

data structure for holding data about a single modification to a source control tool.

Author:
alden almagro
See Also:
Serialized Form

Nested Class Summary
 class Modification.ModifiedFile
           
 
Field Summary
 java.lang.String comment
           
 java.lang.String emailAddress
           
 java.util.List files
           
 java.util.Date modifiedTime
           
 java.lang.String revision
           
 java.lang.String type
           
 java.lang.String userName
           
 
Constructor Summary
Modification()
           
Modification(java.lang.String type)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 Modification.ModifiedFile createModifiedFile(java.lang.String filename, java.lang.String folder)
           
 boolean equals(java.lang.Object o)
           
 void fromElement(org.jdom.Element modification, java.text.DateFormat formatter)
           
 java.lang.String getFileName()
          Convenience method for getting the filename of the first file
 java.lang.String getFolderName()
          Convenience method for getting the foldername of the first file
 java.lang.String getFullPath()
          Concatenates the folderName and fileName of the Modification into a String.
 java.util.List getModifiedFiles()
          Returns the list of modified files for this modification set.
 int hashCode()
           
 void log(java.text.DateFormat formatter)
           
protected  Modification.ModifiedFile newModifiedFile()
           
 org.jdom.Element toElement(java.text.DateFormat formatter)
           
 java.lang.String toString()
           
 java.lang.String toXml(java.text.DateFormat formatter)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public java.lang.String type

modifiedTime

public java.util.Date modifiedTime

userName

public java.lang.String userName

emailAddress

public java.lang.String emailAddress

revision

public java.lang.String revision

comment

public java.lang.String comment

files

public java.util.List files
Constructor Detail

Modification

public Modification()

Modification

public Modification(java.lang.String type)
Method Detail

createModifiedFile

public final Modification.ModifiedFile createModifiedFile(java.lang.String filename,
                                                          java.lang.String folder)

newModifiedFile

protected Modification.ModifiedFile newModifiedFile()

toElement

public org.jdom.Element toElement(java.text.DateFormat formatter)

toXml

public java.lang.String toXml(java.text.DateFormat formatter)

toString

public java.lang.String toString()

log

public void log(java.text.DateFormat formatter)

getFileName

public java.lang.String getFileName()
Convenience method for getting the filename of the first file


getFolderName

public java.lang.String getFolderName()
Convenience method for getting the foldername of the first file


getModifiedFiles

public java.util.List getModifiedFiles()
Returns the list of modified files for this modification set.

Returns:
list of Modification.ModifiedFile objects. If there are no files, this returns an empty list (null is never returned).

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()

fromElement

public void fromElement(org.jdom.Element modification,
                        java.text.DateFormat formatter)

getFullPath

public java.lang.String getFullPath()
Concatenates the folderName and fileName of the Modification into a String. If the folderName is null then it is not included. All backward slashes ("\") are converted to forward slashes ("/").

Returns:
A String containing the full path of the modification