org.hackystat.projectbrowser.page.dailyprojectdata.unittest
Class UnitTestDataModel

java.lang.Object
  extended by org.hackystat.projectbrowser.page.dailyprojectdata.unittest.UnitTestDataModel
All Implemented Interfaces:
java.io.Serializable

public class UnitTestDataModel
extends java.lang.Object
implements java.io.Serializable

The data model for UnitTest DPD display. This data model accommodates multiple Projects. For each project, the data model indicates the number of passing and failing unit tests.

Author:
Philip Johnson, Shaoxuan Zhang
See Also:
Serialized Form

Constructor Summary
UnitTestDataModel()
          The default UnitTestDataModel, which contains no unittest information.
 
Method Summary
 void clear()
          Sets this model to its empty state.
 UnitTestData getUnitTestData(org.hackystat.sensorbase.resource.projects.jaxb.Project project)
          Return the UnitTestData instance associated with the specified project.
 java.util.List<UnitTestData> getUnitTestDataList()
          Returns the list of UnitTestData instances, needed for markup.
 boolean isEmpty()
          Returns true if this data model contains no information.
 void update()
          Updates this data model to reflect the unittest information associated with the selected projects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitTestDataModel

public UnitTestDataModel()
The default UnitTestDataModel, which contains no unittest information.

Method Detail

update

public void update()
Updates this data model to reflect the unittest information associated with the selected projects.


clear

public void clear()
Sets this model to its empty state.


isEmpty

public boolean isEmpty()
Returns true if this data model contains no information. Used to figure out if the associated panel should be visible.

Returns:
True if the data model is empty.

getUnitTestData

public UnitTestData getUnitTestData(org.hackystat.sensorbase.resource.projects.jaxb.Project project)
Return the UnitTestData instance associated with the specified project. Creates and returns a new UnitTestData instance if one is not yet present.

Parameters:
project - The project.
Returns:
The UnitTestData instance for this project.

getUnitTestDataList

public java.util.List<UnitTestData> getUnitTestDataList()
Returns the list of UnitTestData instances, needed for markup.

Returns:
The list of UnitTestData instances.