org.hackystat.projectbrowser.page.dailyprojectdata.coupling
Class CouplingDataModel

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

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

The data model for Coupling DPD display. This data model accommodates multiple Projects. For each project, the data model indicates the number of classes whose level of coupling falls into each of five buckets, from 0-10, 11-20, 21-30, 31-40, 41+. At present, we only get "class" coupling from the "DependencyFinder" tool. This will change after we update the DPD client to not require the tool argument.

Author:
Philip Johnson
See Also:
Serialized Form

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

Constructor Detail

CouplingDataModel

public CouplingDataModel()
The default CouplingDataModel, which contains no coupling information.

Method Detail

update

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


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.

getCouplingData

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

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

getCouplingDataList

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

Returns:
The list of CouplingData instances.