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
static 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)
           
Modification(java.lang.String type, java.lang.String user, java.lang.String comment, java.lang.String email, java.util.Date datetime, java.lang.String revision, java.util.List files)
           
 
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 getComment()
           
 java.lang.String getEmailAddress()
           
 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.
 java.util.Date getModifiedTime()
           
 java.lang.String getRevision()
           
 java.lang.String getType()
           
 java.lang.String getUserName()
           
 int hashCode()
           
 void log(java.text.DateFormat formatter)
           
 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

userName

public java.lang.String userName

comment

public java.lang.String comment

emailAddress

public java.lang.String emailAddress

revision

public java.lang.String revision

modifiedTime

public java.util.Date modifiedTime

files

public java.util.List files
Constructor Detail

Modification

public Modification()

Modification

public Modification(java.lang.String type)

Modification

public Modification(java.lang.String type,
                    java.lang.String user,
                    java.lang.String comment,
                    java.lang.String email,
                    java.util.Date datetime,
                    java.lang.String revision,
                    java.util.List files)
Method Detail

createModifiedFile

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

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

getType

public java.lang.String getType()

getModifiedTime

public java.util.Date getModifiedTime()

getUserName

public java.lang.String getUserName()

getEmailAddress

public java.lang.String getEmailAddress()

getRevision

public java.lang.String getRevision()

getComment

public java.lang.String getComment()