org.hackystat.sensor.ant.perforce
Class PerforceChangeListData

java.lang.Object
  extended by org.hackystat.sensor.ant.perforce.PerforceChangeListData

public class PerforceChangeListData
extends java.lang.Object

Provides a data structure with information about each file affected by a ChangeList and the number of lines added, deleted, and modified.

Author:
Philip Johnson

Nested Class Summary
static class PerforceChangeListData.PerforceFileData
          Inner class that provides information on a single file.
 
Constructor Summary
PerforceChangeListData(java.lang.String owner, int id, java.lang.String modTime)
          Create a new instance with the specified owner.
 
Method Summary
 void addFileData(java.lang.String fileName, int linesAdded, int linesDeleted, int linesModified, int totalLoc)
          Adds the Perforce file data information to this Changelist.
 java.util.List<PerforceChangeListData.PerforceFileData> getFileData()
          Returns as list of PerforceFileData instances associated with this changelist.
 int getId()
          Returns the ID associated with this changelist.
 java.util.Date getModTime()
          Returns the date on which this Changelist was submitted.
 java.lang.String getOwner()
          Returns the owner of this Changelist.
 java.lang.String toString()
          Returns this changelist in a nicely formatted output for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PerforceChangeListData

public PerforceChangeListData(java.lang.String owner,
                              int id,
                              java.lang.String modTime)
Create a new instance with the specified owner.

Parameters:
owner - The owner who committed this changelist.
id - The id for this changelist.
modTime - The time this changelist was submitted.
Method Detail

addFileData

public void addFileData(java.lang.String fileName,
                        int linesAdded,
                        int linesDeleted,
                        int linesModified,
                        int totalLoc)
Adds the Perforce file data information to this Changelist.

Parameters:
fileName - The file name.
linesAdded - The lines added.
linesModified - The lines modified.
linesDeleted - The lines deleted.
totalLoc - The total number of lines in the file.

getFileData

public java.util.List<PerforceChangeListData.PerforceFileData> getFileData()
Returns as list of PerforceFileData instances associated with this changelist.

Returns:
The list of PerforceFileData instances.

getOwner

public java.lang.String getOwner()
Returns the owner of this Changelist.

Returns:
The owner.

getId

public int getId()
Returns the ID associated with this changelist.

Returns:
The id.

getModTime

public java.util.Date getModTime()
Returns the date on which this Changelist was submitted.

Returns:
The date on which this Changelist was submitted.

toString

public java.lang.String toString()
Returns this changelist in a nicely formatted output for debugging purposes.

Overrides:
toString in class java.lang.Object
Returns:
The changelist as a string.