Package de.xima.fc.gui.bean.statistics
Class StatisticsHistoryBean
- java.lang.Object
 - 
- de.xima.fc.gui.bean.statistics.AStatisticsBean
 - 
- de.xima.fc.gui.bean.statistics.StatisticsHistoryBean
 
 
 
- 
- All Implemented Interfaces:
 Serializable
@Named @ViewScoped public class StatisticsHistoryBean extends AStatisticsBean
- Author:
 - XIMA MEDIA GmbH
 - See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
- 
Fields inherited from class de.xima.fc.gui.bean.statistics.AStatisticsBean
localeBean, MIME_TYPE_EXCEL, MIME_TYPE_PDF, SUFFIX_EXCEL, SUFFIX_IMAGE, SUFFIX_PDF, viewContext 
 - 
 
- 
Constructor Summary
Constructors Constructor Description StatisticsHistoryBean() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeChartStyle(EChartStyle chartStyle)Method to change the chart style.voidchangedDateRange()voidchangedTimeScale()Called when the time interval has changed.voiddecrementOffset()Decrement the offset and update the model.org.primefaces.model.StreamedContentdownloadExcelFile()Method to download the chart as an excel file.org.primefaces.model.StreamedContentdownloadPdfFile()Method to download the chart as a PDF file.StringgenerateTimeRangeLabel(org.apache.commons.lang3.tuple.Pair<Calendar,Calendar> calPair)Create the time range label for the current time interval.EChartStylegetChartStyle()List<EChartStyle>getChartStyles()Method to get all available chart styles.StringgetChartWidgetVar()StringgetImageFilename()org.primefaces.model.charts.ChartModelgetModel()intgetOffset()ProjektgetProject()List<Projekt>getProjectsByClient()Method to get all projects of the client.List<Date>getRange()ETimeScalegetTimeScale()List<ETimeScale>getTimeScales()Method to get all available time intervals.voidincrementOffset()Increment the offset and update the model.voidresetRange()Called 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)voidsetRange(List<Date> range)voidsetTimeScale(ETimeScale timeScale)voidupdateModel()Update the model.- 
Methods inherited from class de.xima.fc.gui.bean.statistics.AStatisticsBean
insertImageFilename 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getProject
public Projekt getProject()
 
- 
setProject
public void setProject(Projekt project)
 
- 
setOffset
public void setOffset(int offset)
 
- 
getOffset
public int getOffset()
 
- 
getTimeScale
public ETimeScale getTimeScale()
 
- 
setTimeScale
public void setTimeScale(ETimeScale timeScale)
 
- 
getChartStyle
public EChartStyle getChartStyle()
 
- 
setChartStyle
public void setChartStyle(EChartStyle chartStyle)
 
- 
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
public List<Projekt> getProjectsByClient()
Method to get all projects of the client.- Returns:
 - List of all projects of the client
 
 
- 
getTimeScales
public List<ETimeScale> getTimeScales()
Method to get all available time intervals.- Returns:
 - List of all available time intervals
 
 
- 
getChartStyles
public List<EChartStyle> getChartStyles()
Method to get all available chart styles.- Returns:
 - List of all available chart styles
 
 
- 
changeChartStyle
public void changeChartStyle(EChartStyle chartStyle)
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
public String getImageFilename()
- Specified by:
 getImageFilenamein classAStatisticsBean- Returns:
 - The file name for the image file.
 
 
- 
getChartWidgetVar
public String getChartWidgetVar()
- Specified by:
 getChartWidgetVarin classAStatisticsBean- Returns:
 - The chart widget var.
 
 
- 
generateTimeRangeLabel
public String generateTimeRangeLabel(org.apache.commons.lang3.tuple.Pair<Calendar,Calendar> calPair)
Create the time range label for the current time interval.- Returns:
 - Time range label
 
 
- 
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. 
 - 
 
 -