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 OverViewController

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<OverViewControllerConfiguration,OverViewControllerResultData,OverViewControllerResult>
              extended by org.torweg.pulse.component.statistics.view.OverViewController
All Implemented Interfaces:
Configurable<AbstractStatisticsViewControllerConfiguration>
Direct Known Subclasses:
OverViewGFXController

public class OverViewController
extends AbstractStatisticsViewController<OverViewControllerConfiguration,OverViewControllerResultData,OverViewControllerResult>

Provides the data for the "overview 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
OverViewController()
           
 
Method Summary
protected  OverViewControllerResultData buildViewResultData(Duration duration, Period dataResolution, StatisticsServer statisticsServer, org.hibernate.Session s)
          Builds the OverViewControllerResultData for the given Duration, the given Period (data resolution) and the given StatisticsServer.
 void clearSessionData(ServiceRequest request)
          Removes the result data of the OverViewController from the session.
 OverViewControllerResult initView(ServiceRequest request)
          Initialises the overview view of the statistics.
protected  OverViewControllerResult newResult(OverViewControllerConfiguration configuration, OverViewControllerResultData 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

OverViewController

public OverViewController()
Method Detail

initView

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

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

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

newResult

protected final OverViewControllerResult newResult(OverViewControllerConfiguration configuration, OverViewControllerResultData data)
Factory method.

Simply returns a new OverViewControllerResult with the given OverViewControllerConfiguration and the given OverViewControllerResultData.

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

clearSessionData

@RequireToken
@Action(value="clearSessionDataOverView", generate=true)
@Permission(value="clearSessionDataOverView")
@Groups(values="Admin.Site.Statistics")
public final void clearSessionData(ServiceRequest request)
Removes the result data of the OverViewController 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 ServiceSession true null

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

buildViewResultData

protected final OverViewControllerResultData buildViewResultData(Duration duration, Period dataResolution, StatisticsServer statisticsServer,
                                                                 org.hibernate.Session s)
Builds the OverViewControllerResultData for the given Duration, the given Period (data resolution) and the given StatisticsServer.

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