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 TimeAnalysisViewGFXController

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
                  extended by org.torweg.pulse.component.statistics.view.TimeAnalysisViewGFXController
All Implemented Interfaces:
Configurable<AbstractStatisticsViewControllerConfiguration>
Direct Known Subclasses:
TimeAnalysisViewReportController

public class TimeAnalysisViewGFXController
extends TimeAnalysisViewController

Extends the TimeAnalysisViewController with charting abilities based on the data as provided by the TimeAnalysisViewController (created with JFreeChartTM).

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
TimeAnalysisViewGFXController()
           
 
Method Summary
protected  org.jfree.chart.JFreeChart buildTimeAnalysisDataViewChart(TimeAnalysisViewControllerResultData data)
          Builds the time-analysis-data-JFreeChart from the given TimeAnalysisViewControllerResultData.
 java.lang.Object loadTimeAnalysisChart(ServiceRequest request)
          Returns a PNG - the data chart for the current server and duration (page-impressions daily analysis).
 
Methods inherited from class org.torweg.pulse.component.statistics.view.TimeAnalysisViewController
buildViewResultData, clearSessionData, initView, newResult
 
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

TimeAnalysisViewGFXController

public TimeAnalysisViewGFXController()
Method Detail

loadTimeAnalysisChart

@RequireToken
@Action(value="loadTimeAnalysisChart", generate=true)
@Permission(value="loadTimeAnalysisChart")
@Groups(values="Admin.Site.Statistics")
public final java.lang.Object loadTimeAnalysisChart(ServiceRequest request)
Returns a PNG - the data chart for the current server and duration (page-impressions daily analysis).

The PNG will be rendered with a default height 600px and width of 800px unless request parameters height and/or width are specified.

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
width the width for the PNG false 800
height the height for the PNG false 600

Parameters:
request - the current ServiceRequest
Returns:
a JFreeChartPNGOutputEvent

buildTimeAnalysisDataViewChart

protected final org.jfree.chart.JFreeChart buildTimeAnalysisDataViewChart(TimeAnalysisViewControllerResultData data)
Builds the time-analysis-data-JFreeChart from the given TimeAnalysisViewControllerResultData.

Parameters:
data - the TimeAnalysisViewControllerResultData
Returns:
the overview-data-JFreeChart