org.hackystat.projectbrowser.page.dailyprojectdata.filemetric
Class FileMetricDataModel

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

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

The data model for FileMetric DPD display. This data model accommodates multiple Projects. For each project, the data model indicates the file types in the Project along with how much LOC they had for the day.

Author:
Philip Johnson
See Also:
Serialized Form

Constructor Summary
FileMetricDataModel()
          The default FileMetricDataModel, which contains no build information.
 
Method Summary
 void clear()
          Sets this model to its empty state.
 FileMetricData getFileMetricData(org.hackystat.sensorbase.resource.projects.jaxb.Project project)
          Return the FileMetricData instance associated with the specified project.
 java.util.List<FileMetricData> getFileMetricDataList()
          Returns the list of FileMetricData instances, needed for markup.
 boolean isEmpty()
          Returns true if this data model contains no information.
 void update()
          Updates this data model to reflect the build 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

FileMetricDataModel

public FileMetricDataModel()
The default FileMetricDataModel, which contains no build information.

Method Detail

update

public void update()
Updates this data model to reflect the build 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.

getFileMetricData

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

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

getFileMetricDataList

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

Returns:
The list of FileMetricData instances.