Class StatisticsHistoryBean

    • Constructor Detail

      • StatisticsHistoryBean

        public StatisticsHistoryBean()
    • Method Detail

      • timeScaleDetailsFor

        public String timeScaleDetailsFor​(ETimeScale scale)
        Returns:
        a string to be used as the label details for the provided time scale
      • onPreviousDateRange

        public void onPreviousDateRange()
        shifts the current date range backward by one
      • onNextDateRange

        public void onNextDateRange()
        shifts the current date range forward by one
      • onTimeScaleChanged

        public void onTimeScaleChanged()
        Called when the time interval has changed.
      • onRefreshModel

        public void onRefreshModel()
        reloads the related entities (Mandants or projects) and updates the frontend model
      • getProjectSelectItems

        public List<javax.faces.model.SelectItem> getProjectSelectItems()
        Lazy Getter for the options of the project selectbox.
        Returns:
        the select items, grouped by 'online'/'offline' state
      • getModel

        public org.primefaces.model.charts.ChartModel getModel()
        lazily initializes the current chart model and returns it
      • setModel

        public void setModel​(org.primefaces.model.charts.ChartModel model)
      • isPreviousDateRangeDisabled

        public boolean isPreviousDateRangeDisabled()
        Returns:
        true if the current date range is not shiftable backward, otherwise false
      • isNextDateRangeDisabled

        public boolean isNextDateRangeDisabled()
        Returns:
        true if the current date range is not shiftable forward, otherwise false
      • completeMandant

        public List<NamedEntityDto> completeMandant​(String query)
        Completion handler for the Mandant autocomplete.
        Parameters:
        query - the user input to match the Mandant names against
        Returns:
        the list of matching Mandants
      • 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 Excel data
      • 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.
      • setSelectedMandant

        public void setSelectedMandant​(NamedEntityDto selectedMandant)
      • setSelectedProject

        public void setSelectedProject​(BasicProjectDto selectedProject)
      • setTimeScale

        public void setTimeScale​(ETimeScale timeScale)
      • setChartStyle

        public void setChartStyle​(EChartStyle chartStyle)