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 OverViewGFXController

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

public class OverViewGFXController
extends OverViewController

Extends the OverViewController with charting abilities based on the data as provided by the OverViewController (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
OverViewGFXController()
           
 
Method Summary
protected  org.jfree.chart.JFreeChart buildOverViewCountryChart(OverViewControllerResultData data)
          Builds the overview-country-JFreeChart from the given OverViewControllerResultData.
protected  org.jfree.chart.JFreeChart buildOverViewDataChart(OverViewControllerResultData data, boolean addItemLabels)
          Builds the overview-data-JFreeChart from the given OverViewControllerResultData.
 java.lang.Object loadOverViewCountryChart(ServiceRequest request)
          Returns a PNG - the overview country data pie-chart for the current server and duration.
 java.lang.Object loadOverViewDataChart(ServiceRequest request)
          Returns a PNG - the overview data chart for the current server and duration (page-impressions,visits,bounces).
 
Methods inherited from class org.torweg.pulse.component.statistics.view.OverViewController
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

OverViewGFXController

public OverViewGFXController()
Method Detail

loadOverViewDataChart

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

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

loadOverViewCountryChart

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

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

buildOverViewDataChart

protected final org.jfree.chart.JFreeChart buildOverViewDataChart(OverViewControllerResultData data,
                                                                  boolean addItemLabels)
Builds the overview-data-JFreeChart from the given OverViewControllerResultData.

Parameters:
data - the OverViewControllerResultData
addItemLabels - indicates whether to render chart with item labels
Returns:
the overview-data-JFreeChart

buildOverViewCountryChart

protected final org.jfree.chart.JFreeChart buildOverViewCountryChart(OverViewControllerResultData data)
Builds the overview-country-JFreeChart from the given OverViewControllerResultData.

Parameters:
data - the OverViewControllerResultData
Returns:
the overview-country-JFreeChart