org.hackystat.dailyprojectdata.resource.commit
Class CommitDataContainer

java.lang.Object
  extended by org.hackystat.dailyprojectdata.resource.commit.CommitDataContainer

public class CommitDataContainer
extends java.lang.Object

The data container that abstracts the data retrieval of Commit information. To Do: (1) change from a List to a Map[Owner, SensorData].

Author:
aito

Constructor Summary
CommitDataContainer()
           
 
Method Summary
 void addCommitData(org.hackystat.sensorbase.resource.sensordata.jaxb.SensorData data)
          Adds the specified SensorData instance to this container if it contains the three Commit properties (linesDeleted, linesAdded, totalLines) and if these property values are integers.
 int getCommits(java.lang.String owner)
          Returns the total commits made by the specified owner.
 java.util.List<CommitData> getData()
          Returns a copy of the list containing all of the added SensorData instances.
 int getLinesAdded(java.lang.String owner)
          Returns the total lines added by the specified owner.
 int getLinesDeleted(java.lang.String owner)
          Returns the total lines deleted by the specified owner.
 int getLinesModified(java.lang.String owner)
          Returns the total lines modified by the specified owner.
 java.util.List<java.lang.String> getOwners()
          Returns a set of owners of the wrapped SensorData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommitDataContainer

public CommitDataContainer()
Method Detail

addCommitData

public void addCommitData(org.hackystat.sensorbase.resource.sensordata.jaxb.SensorData data)
Adds the specified SensorData instance to this container if it contains the three Commit properties (linesDeleted, linesAdded, totalLines) and if these property values are integers.

Parameters:
data - the specified data instance.

getOwners

public java.util.List<java.lang.String> getOwners()
Returns a set of owners of the wrapped SensorData.

Returns:
the list of sensor data owners.

getLinesAdded

public int getLinesAdded(java.lang.String owner)
Returns the total lines added by the specified owner.

Parameters:
owner - the specified owner.
Returns:
the total lines added.

getLinesDeleted

public int getLinesDeleted(java.lang.String owner)
Returns the total lines deleted by the specified owner.

Parameters:
owner - the specified owner.
Returns:
the total lines deleted.

getLinesModified

public int getLinesModified(java.lang.String owner)
Returns the total lines modified by the specified owner. Not all CM systems track lines modified. SVN does not, Perforce does.

Parameters:
owner - The specified owner.
Returns:
The total lines modified.

getCommits

public int getCommits(java.lang.String owner)
Returns the total commits made by the specified owner.

Parameters:
owner - the specified owner.
Returns:
the total commits.

getData

public java.util.List<CommitData> getData()
Returns a copy of the list containing all of the added SensorData instances.

Returns:
the SensorData list copy.