org.hackystat.sensor.ant.svn
Class CommitRecord

java.lang.Object
  extended by org.hackystat.sensor.ant.svn.CommitRecord

public class CommitRecord
extends java.lang.Object

A commit record tracks all items that get modified during an SVN revision. Note that in SVN, versioning is performed on the entire repository instead of a single file.

Author:
(Cedric) Qin ZHANG

Constructor Summary
CommitRecord(org.tmatesoft.svn.core.io.SVNRepository svnRepository, org.tmatesoft.svn.core.SVNLogEntry svnLogEntry)
          Constructs this instance.
 
Method Summary
 java.lang.String getAuthor()
          Gets the author who made the commit.
 java.util.Collection<CommitRecordEntry> getCommitRecordEntries()
          Gets all changed items in this revision.
 java.util.Date getCommitTime()
          Gets the commit time.
 java.lang.String getMessage()
          Gets the commit log message.
 long getRevision()
          Gets this revision number.
 java.lang.String toString()
          Returns the string representation of this record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommitRecord

CommitRecord(org.tmatesoft.svn.core.io.SVNRepository svnRepository,
             org.tmatesoft.svn.core.SVNLogEntry svnLogEntry)
       throws java.lang.Exception
Constructs this instance.

Parameters:
svnRepository - The svn repository.
svnLogEntry - The svn log for a revision.
Throws:
java.lang.Exception - If there is any error.
Method Detail

getRevision

public final long getRevision()
Gets this revision number.

Returns:
The revision number.

getAuthor

public java.lang.String getAuthor()
Gets the author who made the commit.

Returns:
The authoer.

getCommitTime

public java.util.Date getCommitTime()
Gets the commit time.

Returns:
The commit time.

getMessage

public java.lang.String getMessage()
Gets the commit log message.

Returns:
The commit log message.

toString

public java.lang.String toString()
Returns the string representation of this record.

Overrides:
toString in class java.lang.Object
Returns:
the string representation.

getCommitRecordEntries

public java.util.Collection<CommitRecordEntry> getCommitRecordEntries()
Gets all changed items in this revision.

Returns:
A collection of CommitRecordEntry instances.