org.hackystat.projectbrowser.page.dailyprojectdata
Class DailyProjectDataSession

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

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

Session instance for the daily project data page to hold its state.

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

Field Summary
static java.lang.String ANALYSIS_KEY
          The parameter key of dpd analysis.
static java.lang.String DATE_KEY
          The parameter key of date.
static java.lang.String PARAMETER_ORDER_MESSAGE
          The parameter instruction message.
static java.lang.String SELECTED_PROJECTS_KEY
          The parameter key of selectedProjects.
 
Constructor Summary
DailyProjectDataSession()
          Initialize this session, including the list of context-sensitive menus.
 
Method Summary
 void clearDataModels()
          Sets all analysis data models to their empty state.
 void clearParamErrorMessage()
          Clears the paramErrorMessage.
 java.lang.String getAnalysis()
          Gets the selected analysis.
 java.util.List<java.lang.String> getAnalysisList()
          Returns the list of possible analyses.
static java.lang.String getAssociatedDpdAnalysis(java.lang.String telemetryName)
          Return the associated DPD analysis with the given telemetry.
 BuildDataModel getBuildDataModel()
          Gets the Build model associated with this session.
 CommitDataModel getCommitDataModel()
          Gets the Commit model associated with this session.
 ComplexityDataModel getComplexityDataModel()
          Gets the Complexity model associated with this session.
 ContextSensitiveMenu getContextSensitiveMenu(java.lang.String name)
          Gets the context sensitive menu with the passed name, or null if not found.
 java.util.List<ContextSensitiveMenu> getContextSensitiveMenus()
          Gets all context sensitive menus.
 ContextSensitivePanel getContextSensitivePanel()
          Get the context sensitive panel holding the context sensitive menus.
 CouplingDataModel getCouplingDataModel()
          Gets the Coupling model associated with this session.
 CoverageDataModel getCoverageDataModel()
          Get the Coverage data model.
 java.util.Date getDate()
          Gets the date associated with this page.
 java.lang.String getDateString()
          Returns the current date in yyyy-MM-dd format.
 DevTimeDataModel getDevTimeDataModel()
          Gets the DevTime model associated with this session.
 java.lang.String getFeedback()
          Gets the feedback string, and also clears it.
 FileMetricDataModel getFileMetricDataModel()
          Gets the FileMetric model associated with this session.
 IssueDataModel getIssueDataModel()
          Gets the Issue model associated with this session.
 org.apache.wicket.PageParameters getPageParameters()
          Returns a PageParameters instance that represents the content of the input form.
 java.lang.String getParamErrorMessage()
           
 java.util.List<org.hackystat.sensorbase.resource.projects.jaxb.Project> getSelectedProjects()
          Returns the list of projects selected by the user.
 UnitTestDataModel getUnitTestDataModel()
          Gets the Unit test model associated with this session.
 boolean loadPageParameters(org.apache.wicket.PageParameters parameters)
          Load data from URL parameters into this session.
 void setAnalysis(java.lang.String analysis)
          Sets the selected analysis.
 void setContextSensitivePanel(ContextSensitivePanel panel)
          Sets the panel containing the context sensitive menus.
 void setDate(java.util.Date date)
          Sets the date associated with this page.
 void setFeedback(java.lang.String feedback)
          Sets the feedback string.
 void setSelectedProjects(java.util.List<org.hackystat.sensorbase.resource.projects.jaxb.Project> projects)
          Sets the set of selected projects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANALYSIS_KEY

public static final java.lang.String ANALYSIS_KEY
The parameter key of dpd analysis.

See Also:
Constant Field Values

DATE_KEY

public static final java.lang.String DATE_KEY
The parameter key of date.

See Also:
Constant Field Values

SELECTED_PROJECTS_KEY

public static final java.lang.String SELECTED_PROJECTS_KEY
The parameter key of selectedProjects.

See Also:
Constant Field Values

PARAMETER_ORDER_MESSAGE

public static final java.lang.String PARAMETER_ORDER_MESSAGE
The parameter instruction message.

See Also:
Constant Field Values
Constructor Detail

DailyProjectDataSession

public DailyProjectDataSession()
Initialize this session, including the list of context-sensitive menus.

Method Detail

getAssociatedDpdAnalysis

public static java.lang.String getAssociatedDpdAnalysis(java.lang.String telemetryName)
Return the associated DPD analysis with the given telemetry.

Parameters:
telemetryName - the name of the given telemetry
Returns:
the associated DPD, null if not found a match one.

getPageParameters

public org.apache.wicket.PageParameters getPageParameters()
Returns a PageParameters instance that represents the content of the input form.

Returns:
a PageParameters instance.

loadPageParameters

public boolean loadPageParameters(org.apache.wicket.PageParameters parameters)
Load data from URL parameters into this session.

Parameters:
parameters - the URL parameters
Returns:
true if all parameters are loaded correctly

getDate

public java.util.Date getDate()
Gets the date associated with this page.

Returns:
The date for this page.

setDate

public void setDate(java.util.Date date)
Sets the date associated with this page.

Parameters:
date - The date for this page.

getDateString

public java.lang.String getDateString()
Returns the current date in yyyy-MM-dd format.

Returns:
The date as a simple string.

getSelectedProjects

public java.util.List<org.hackystat.sensorbase.resource.projects.jaxb.Project> getSelectedProjects()
Returns the list of projects selected by the user.

Returns:
The list of projects selected by the user.

setSelectedProjects

public void setSelectedProjects(java.util.List<org.hackystat.sensorbase.resource.projects.jaxb.Project> projects)
Sets the set of selected projects.

Parameters:
projects - The projects.

setAnalysis

public void setAnalysis(java.lang.String analysis)
Sets the selected analysis.

Parameters:
analysis - The analysis to set.

getAnalysis

public java.lang.String getAnalysis()
Gets the selected analysis.

Returns:
The analysis.

getAnalysisList

public java.util.List<java.lang.String> getAnalysisList()
Returns the list of possible analyses.

Returns:
The analysisList.

setFeedback

public void setFeedback(java.lang.String feedback)
Sets the feedback string.

Parameters:
feedback - The feedback to set.

getFeedback

public java.lang.String getFeedback()
Gets the feedback string, and also clears it.

Returns:
The feedback string.

getContextSensitiveMenus

public java.util.List<ContextSensitiveMenu> getContextSensitiveMenus()
Gets all context sensitive menus.

Returns:
The context sensitive menus.

getContextSensitiveMenu

public ContextSensitiveMenu getContextSensitiveMenu(java.lang.String name)
Gets the context sensitive menu with the passed name, or null if not found.

Parameters:
name - The name of the context sensitive menu.
Returns:
The menu instance, or null if not found.

getContextSensitivePanel

public ContextSensitivePanel getContextSensitivePanel()
Get the context sensitive panel holding the context sensitive menus.

Returns:
The context sensitive panel.

setContextSensitivePanel

public void setContextSensitivePanel(ContextSensitivePanel panel)
Sets the panel containing the context sensitive menus.

Parameters:
panel - The panel.

getCoverageDataModel

public CoverageDataModel getCoverageDataModel()
Get the Coverage data model.

Returns:
The Coverage data model associated with this session.

getUnitTestDataModel

public UnitTestDataModel getUnitTestDataModel()
Gets the Unit test model associated with this session.

Returns:
The Unit Test model.

getCouplingDataModel

public CouplingDataModel getCouplingDataModel()
Gets the Coupling model associated with this session.

Returns:
The Coupling model.

getComplexityDataModel

public ComplexityDataModel getComplexityDataModel()
Gets the Complexity model associated with this session.

Returns:
The Complexity model.

getBuildDataModel

public BuildDataModel getBuildDataModel()
Gets the Build model associated with this session.

Returns:
The Build model.

getDevTimeDataModel

public DevTimeDataModel getDevTimeDataModel()
Gets the DevTime model associated with this session.

Returns:
The DevTime model.

getFileMetricDataModel

public FileMetricDataModel getFileMetricDataModel()
Gets the FileMetric model associated with this session.

Returns:
The FileMetric model.

getCommitDataModel

public CommitDataModel getCommitDataModel()
Gets the Commit model associated with this session.

Returns:
The Commit model.

getIssueDataModel

public IssueDataModel getIssueDataModel()
Gets the Issue model associated with this session.

Returns:
The Issue model.

getParamErrorMessage

public java.lang.String getParamErrorMessage()
Returns:
the paramErrorMessage

clearParamErrorMessage

public void clearParamErrorMessage()
Clears the paramErrorMessage.


clearDataModels

public void clearDataModels()
Sets all analysis data models to their empty state.