com.mycompany.controller
Class ChartController

java.lang.Object
  extended by com.mycompany.controller.AbstractController
      extended by com.mycompany.controller.ChartController
All Implemented Interfaces:
java.io.Serializable

public class ChartController
extends AbstractController

Controller class for charts.

Author:
Ian Hlavats (ian@tarantulaconsulting.com)
See Also:
Serialized Form

Constructor Summary
ChartController()
           
 
Method Summary
 org.primefaces.model.chart.CartesianChartModel getBarChartModel()
           
 org.primefaces.model.chart.PieChartModel getLivePieModel()
          This method builds a PieChartModel of active user click counts.
 org.primefaces.model.chart.PieChartModel getPieChartModel()
           
 void init(javax.faces.event.ComponentSystemEvent event)
          Initializes the pie chart and bar chart models from data in our database.
 void itemSelect(org.primefaces.event.ItemSelectEvent event)
           
 void setChartService(ChartService chartService)
           
 void setUserService(UserService userService)
           
 
Methods inherited from class com.mycompany.controller.AbstractController
setUserSession
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartController

public ChartController()
Method Detail

getBarChartModel

public org.primefaces.model.chart.CartesianChartModel getBarChartModel()

getLivePieModel

public org.primefaces.model.chart.PieChartModel getLivePieModel()
This method builds a PieChartModel of active user click counts.

Returns:
A PieChartModel.

getPieChartModel

public org.primefaces.model.chart.PieChartModel getPieChartModel()

init

public void init(javax.faces.event.ComponentSystemEvent event)
Initializes the pie chart and bar chart models from data in our database. We can't do this in the constructor because the EntityManager is injected after the object is constructed, so this method handles the initialization during the pre-render view event.

Parameters:
event - The view event.

itemSelect

public void itemSelect(org.primefaces.event.ItemSelectEvent event)

setChartService

public void setChartService(ChartService chartService)

setUserService

public void setUserService(UserService userService)