Class StatisticsHistoryBean

    • Constructor Detail

      • StatisticsHistoryBean

        public StatisticsHistoryBean()
    • Method Detail

      • 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()
      • setTimeScale

        public void setTimeScale​(ETimeScale timeScale)
      • 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
      • 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.