org.torweg.pulse.component.statistics.view
Class GroupAnalysisViewController
java.lang.Object
org.torweg.pulse.bundle.Controller
org.torweg.pulse.component.statistics.view.AbstractStatisticsController<T,V>
org.torweg.pulse.component.statistics.view.AbstractStatisticsViewController<GroupAnalysisViewControllerConfiguration,GroupAnalysisViewControllerResultData,GroupAnalysisViewControllerResult>
org.torweg.pulse.component.statistics.view.GroupAnalysisViewController
- All Implemented Interfaces:
- Configurable<AbstractStatisticsViewControllerConfiguration>
- Direct Known Subclasses:
- GroupAnalysisViewReportController
public class GroupAnalysisViewController
- extends AbstractStatisticsViewController<GroupAnalysisViewControllerConfiguration,GroupAnalysisViewControllerResultData,GroupAnalysisViewControllerResult>
Provides the data for the "group analysis view" of the pulse website
administration UI of the statistics component.
- Version:
- $Revision: 2013 $
- Author:
- Daniel Dietz
| 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupAnalysisViewController
public GroupAnalysisViewController()
initView
@RequireToken
@Action(value="initStatisticsGroupAnalysisView", generate=true)
@Permission(value="initStatisticsGroupAnalysisView")
@Groups(values="Admin.Site.Statistics")
public final GroupAnalysisViewControllerResult initView(ServiceRequest request)
- Initialises the group analysis view of the statistics.
| request parameter name |
description |
required |
default |
serverId |
the id of the StatisticsServer |
true |
null |
duration |
A String formatted as follows "from-to" with
"from" and "to" being time-stamps. |
false |
as configured |
- Specified by:
initView in class AbstractStatisticsController<GroupAnalysisViewControllerConfiguration,GroupAnalysisViewControllerResult>
- Parameters:
request - the current ServiceRequest
- Returns:
GroupAnalysisViewControllerResult- See Also:
#initView(org.torweg.pulse.service.request.ServiceRequest)
newResult
protected final GroupAnalysisViewControllerResult newResult(GroupAnalysisViewControllerConfiguration configuration, GroupAnalysisViewControllerResultData data)
- Factory method.
Simply returns a new GroupAnalysisViewControllerResult with the
given GroupAnalysisViewControllerConfiguration and the given
GroupAnalysisViewControllerResultData.
- Specified by:
newResult in class AbstractStatisticsViewController<GroupAnalysisViewControllerConfiguration,GroupAnalysisViewControllerResultData,GroupAnalysisViewControllerResult>
- Parameters:
configuration - GroupAnalysisViewControllerConfigurationdata - GroupAnalysisViewControllerResultData
- Returns:
- a new
GroupAnalysisViewControllerResult - See Also:
#newResult(org.torweg.pulse.component.statistics.view.
AbstractStatisticsViewControllerConfiguration,
org.torweg.pulse.component.
statistics.view.AbstractStatisticsViewControllerResultData)
buildViewResultData
protected final GroupAnalysisViewControllerResultData buildViewResultData(Duration duration, Period dataResolution, StatisticsServer statisticsServer,
org.hibernate.Session s)
- Used for initialisation of the ui only.
- Specified by:
buildViewResultData in class AbstractStatisticsViewController<GroupAnalysisViewControllerConfiguration,GroupAnalysisViewControllerResultData,GroupAnalysisViewControllerResult>
- Parameters:
duration - the DurationdataResolution - the Period to be used as "data resolution"statisticsServer - the StatisticsServers - the current HibernateTM.session
- Returns:
- the
GroupAnalysisViewControllerResultData
loadTree
@RequireToken
@Action(value="loadTreeStatisticsGroupAnalysisView", generate=true)
@Permission(value="loadTreeStatisticsGroupAnalysisView")
@Groups(values="Admin.Site.Statistics")
public final GroupAnalysisViewControllerResult loadTree(ServiceRequest request)
- Loads the (data-)nodes for the group analysis tree.
- Parameters:
request - the current ServiceRequest
- Returns:
- a
JSONOutputEvent with the nodes for the tree
loadRootPathTreeElement
protected final PathTreeElement loadRootPathTreeElement(StatisticsServer statisticsServer,
org.hibernate.Session s)
- Loads the root-
PathTreeElements for the given
StatisticsServer.
- Parameters:
statisticsServer - the StatisticsServers - the HibernateTM-Session to be used for
loading
- Returns:
- a
List<? extends AbstractAggregation>
loadPathTreeAggregations
protected final java.util.List<PathTreeAggregation> loadPathTreeAggregations(PathTreeElement path, Duration duration,
org.hibernate.Session s)
- Loads the
PathTreeAggregations for the given
PathTreeElement and the given Duration.
- Parameters:
path - the current PathTreeElementduration - the Durations - the HibernateTM-Session to be used for
loading
- Returns:
- a
List<PathTreeAggregation>