Class StatisticsHistoryBean
java.lang.Object
de.xima.fc.gui.bean.statistics.AStatisticsBean
de.xima.fc.gui.bean.statistics.StatisticsHistoryBean
- All Implemented Interfaces:
Serializable
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
Fields inherited from class AStatisticsBean
localeBean, MIME_TYPE_EXCEL, MIME_TYPE_PDF, SUFFIX_EXCEL, SUFFIX_IMAGE, SUFFIX_PDF, viewContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeChartStyle(EChartStyle chartStyle) Method to change the chart style.voidvoidCalled when the time interval has changed.voidDecrement the offset and update the model.org.primefaces.model.StreamedContentMethod to download the chart as an Excel file.org.primefaces.model.StreamedContentMethod to download the chart as a PDF file.generateTimeRangeLabel(org.apache.commons.lang3.tuple.Pair<Calendar, Calendar> calPair) Create the time range label for the current time interval.Method to get all available chart styles.org.primefaces.model.charts.ChartModelgetModel()intMethod to get all projects of the client.getRange()Method to get all available time intervals.voidIncrement the offset and update the model.voidCalled when the range is reset or time interval changed.voidsetChartStyle(EChartStyle chartStyle) voidsetModel(org.primefaces.model.charts.ChartModel model) voidsetOffset(int offset) voidsetProject(Projekt project) voidvoidsetTimeScale(ETimeScale timeScale) voidUpdate the model.Methods inherited from class AStatisticsBean
insertImageFilename
-
Constructor Details
-
StatisticsHistoryBean
public StatisticsHistoryBean()
-
-
Method Details
-
getProject
-
setProject
-
getRange
-
setRange
-
setOffset
public void setOffset(int offset) -
getOffset
public int getOffset() -
getTimeScale
-
setTimeScale
-
getChartStyle
-
setChartStyle
-
getModel
public org.primefaces.model.charts.ChartModel getModel() -
setModel
public void setModel(org.primefaces.model.charts.ChartModel model) -
incrementOffset
public void incrementOffset()Increment the offset and update the model. -
decrementOffset
public void decrementOffset()Decrement the offset and update the model. -
changedTimeScale
public void changedTimeScale()Called when the time interval has changed. -
changedDateRange
public void changedDateRange() -
resetRange
public void resetRange()Called when the range is reset or time interval changed. -
getProjectsByClient
-
getTimeScales
Method to get all available time intervals.- Returns:
- List of all available time intervals
-
getChartStyles
Method to get all available chart styles.- Returns:
- List of all available chart styles
-
changeChartStyle
Method to change the chart style. Updates the model afterward.- Parameters:
chartStyle- Chart style to change to
-
downloadExcelFile
public org.primefaces.model.StreamedContent downloadExcelFile()Method to download the chart as an Excel file.- Returns:
- StreamedContent with the image data
-
downloadPdfFile
public org.primefaces.model.StreamedContent downloadPdfFile()Method to download the chart as a PDF file.- Returns:
- StreamedContent with the image data
-
getImageFilename
- Specified by:
getImageFilenamein classAStatisticsBean- Returns:
- The file name for the image file.
-
getChartWidgetVar
- Specified by:
getChartWidgetVarin classAStatisticsBean- Returns:
- The chart widget var.
-
generateTimeRangeLabel
-
updateModel
public void updateModel()Update the model. First get the start and end time point. Then fetch and process the data. Lastly construct the chart data.
-