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.user
Class UserStatisticsGFXController

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.statistics.user.UserStatisticsController
          extended by org.torweg.pulse.component.statistics.user.UserStatisticsGFXController
All Implemented Interfaces:
Configurable<UserStatisticsControllerConfiguration>
Direct Known Subclasses:
UserStatisticsPDFController

public class UserStatisticsGFXController
extends UserStatisticsController

Extends the UserStatisticsController by charting functionality (created with JFreeChartTM).

Version:
$Revision: 1620 $
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.user.UserStatisticsController
LOGGER
 
Constructor Summary
UserStatisticsGFXController()
           
 
Method Summary
protected  org.jfree.chart.JFreeChart buildMonthChart(java.lang.Integer months)
          Builds the month-JFreeChart.
protected  org.jfree.chart.JFreeChart buildYearChart(java.lang.Integer year)
          Builds the year-JFreeChart.
 java.lang.Object loadMonthChart(ServiceRequest request)
          Returns a PNG - the month chart for the users.
 java.lang.Object loadYearChart(ServiceRequest request)
          Returns a PNG - the year chart for the users.
 
Methods inherited from class org.torweg.pulse.component.statistics.user.UserStatisticsController
buildInitialisationResult, getConfiguration, initialize, initUserStatistics, loadMonthTotals, loadTotal, loadYearTotals
 
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

UserStatisticsGFXController

public UserStatisticsGFXController()
Method Detail

loadYearChart

@RequireToken
@Action(value="loadYearChart", generate=true)
@Permission(value="loadYearChart")
@Groups(values="Admin.User.Statistics")
public final java.lang.Object loadYearChart(ServiceRequest request)
Returns a PNG - the year chart for the users.

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
year the year to start from (e.g. 2000 will produce chart for all Users created created from 2000 until now) 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

buildYearChart

protected final org.jfree.chart.JFreeChart buildYearChart(java.lang.Integer year)
Builds the year-JFreeChart.

Parameters:
year - the year
Returns:
a JFreeChart

loadMonthChart

@RequireToken
@Action(value="loadMonthChart", generate=true)
@Permission(value="loadMonthChart")
@Groups(values="Admin.User.Statistics")
public final java.lang.Object loadMonthChart(ServiceRequest request)
Returns a PNG - the month chart for the users.

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
months number of months to go back from current 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

buildMonthChart

protected final org.jfree.chart.JFreeChart buildMonthChart(java.lang.Integer months)
Builds the month-JFreeChart.

Parameters:
months - the number of months to go back
Returns:
a JFreeChart