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:
  • Constructor Details

    • StatisticsHistoryBean

      public StatisticsHistoryBean()
  • Method Details

    • getProject

      public Projekt getProject()
    • setProject

      public void setProject(Projekt project)
    • getRange

      public List<Date> getRange()
    • setRange

      public void setRange(List<Date> range)
    • 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:
      getImageFilename in class AStatisticsBean
      Returns:
      The file name for the image file.
    • getChartWidgetVar

      public String getChartWidgetVar()
      Specified by:
      getChartWidgetVar in class AStatisticsBean
      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.