pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.statistics.view
Class TimeAnalysisViewController

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.statistics.view.AbstractStatisticsController<T,V>
          extended by org.torweg.pulse.component.statistics.view.AbstractStatisticsViewController<TimeAnalysisViewControllerConfiguration,TimeAnalysisViewControllerResultData,TimeAnalysisViewControllerResult>
              extended by org.torweg.pulse.component.statistics.view.TimeAnalysisViewController
All Implemented Interfaces:
Configurable<AbstractStatisticsViewControllerConfiguration>
Direct Known Subclasses:
TimeAnalysisViewGFXController

public class TimeAnalysisViewController
extends AbstractStatisticsViewController<TimeAnalysisViewControllerConfiguration,TimeAnalysisViewControllerResultData,TimeAnalysisViewControllerResult>

Provides the data for the "time analysis view" of the pulse website administration UI of the statistics component.

Version:
$Revision: 1568 $
Author:
Daniel Dietz

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Field Summary
 
Fields inherited from class org.torweg.pulse.component.statistics.view.AbstractStatisticsViewController
DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, NO_SERVERID
 
Fields inherited from class org.torweg.pulse.component.statistics.view.AbstractStatisticsController
LOGGER
 
Constructor Summary
TimeAnalysisViewController()
           
 
Method Summary
protected  TimeAnalysisViewControllerResultData buildViewResultData(Duration duration, Period dataResolution, StatisticsServer statisticsServer, org.hibernate.Session s)
          TODO.
 void clearSessionData(ServiceRequest request)
          Removes the result data of the TimeAnalysisViewController from the session.
 TimeAnalysisViewControllerResult initView(ServiceRequest request)
          Initialises the time analysis view of the statistics.
protected  TimeAnalysisViewControllerResult newResult(TimeAnalysisViewControllerConfiguration configuration, TimeAnalysisViewControllerResultData data)
          Factory method.
 
Methods inherited from class org.torweg.pulse.component.statistics.view.AbstractStatisticsViewController
chartHeightFromCommand, chartWidthFromCommand, determineJFreeChartTimePeriod, durationFromCommand, fetchResultDataFromSession, fileNameForReport, initView, integerFromCommand, loadAggregations, loadStatisticsServer, outputReportPDF, putResultDataInSession, removeResultDataFromSession, resolutionFromCommand, serverIdFromCommand, userIsNotAllowedEvent
 
Methods inherited from class org.torweg.pulse.component.statistics.view.AbstractStatisticsController
getConfiguration, hasRoleForServer, initialize
 
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeAnalysisViewController

public TimeAnalysisViewController()
Method Detail

initView

@RequireToken
@Action(value="initStatisticsTimeAnalysisView", generate=true)
@Permission(value="initStatisticsTimeAnalysisView")
@Groups(values="Admin.Site.Statistics")
public final TimeAnalysisViewControllerResult initView(ServiceRequest request)
Initialises the time analysis view of the statistics.

request parameter name description required default
serverId the id of the StatisticsServer true null
duration A String formatted as follows "from-to" with "from" and "to" being time-stamps. false as configured

Specified by:
initView in class AbstractStatisticsController<TimeAnalysisViewControllerConfiguration,TimeAnalysisViewControllerResult>
Parameters:
request - the current ServiceRequest
Returns:
TimeAnalysisViewControllerResult
See Also:
#initView(org.torweg.pulse.service.request.ServiceRequest)

newResult

protected final TimeAnalysisViewControllerResult newResult(TimeAnalysisViewControllerConfiguration configuration, TimeAnalysisViewControllerResultData data)
Factory method.

Simply returns a new TimeAnalysisViewControllerResult with the given TimeAnalysisViewControllerConfiguration and the given TimeAnalysisViewControllerResultData.

Specified by:
newResult in class AbstractStatisticsViewController<TimeAnalysisViewControllerConfiguration,TimeAnalysisViewControllerResultData,TimeAnalysisViewControllerResult>
Parameters:
configuration - TimeAnalysisViewControllerConfiguration
data - TimeAnalysisViewControllerResultData
Returns:
a new TimeAnalysisViewControllerResult
See Also:
#newResult(org.torweg.pulse.component.statistics.view. AbstractStatisticsViewControllerConfiguration, org.torweg.pulse.component. statistics.view.AbstractStatisticsViewControllerResultData)

clearSessionData

@RequireToken
@Action(value="clearSessionDataTimeAnalysis", generate=true)
@Permission(value="clearSessionDataTimeAnalysis")
@Groups(values="Admin.Site.Statistics")
public final void clearSessionData(ServiceRequest request)
Removes the result data of the TimeAnalysisViewController from the session.

request parameter name description required default
serverId the id of the StatisticsServer the result-data of which is to be removed form the ServiecSession true null

Parameters:
request - the current ServiceRequest
See Also:
#initView(org.torweg.pulse.service.request.ServiceRequest)

buildViewResultData

protected final TimeAnalysisViewControllerResultData buildViewResultData(Duration duration, Period dataResolution, StatisticsServer statisticsServer,
                                                                         org.hibernate.Session s)
TODO.

Specified by:
buildViewResultData in class AbstractStatisticsViewController<TimeAnalysisViewControllerConfiguration,TimeAnalysisViewControllerResultData,TimeAnalysisViewControllerResult>
Parameters:
duration - the Duration
dataResolution - the Period to be used as "data resolution"
statisticsServer - the StatisticsServer
s - the current HibernateTM.session
Returns:
the TimeAnalysisViewControllerResultData