Interface AnalyticsService


  • public interface AnalyticsService
    • Method Detail

      • computeChartData

        ChartDataList computeChartData​(AnalyticsFilter filter)
        Retrieve analytics chart data
        Parameters:
        filter - used search filters and aggregations to compute data
        Returns:
        computed analytics chart data
      • computePercentageChartData

        PercentageChartResult computePercentageChartData​(AnalyticsPercentageFilter filter)
        Retrieve analytics percentage chart data
        Parameters:
        filter - used search filters and aggregations to compute data
        Returns:
        computed analytics chart data
      • computeTableColumnData

        TableColumnResult computeTableColumnData​(TableColumnResult columnResult,
                                                 AnalyticsTableFilter tableFilter,
                                                 AnalyticsFilter filter,
                                                 AnalyticsPeriod period,
                                                 AnalyticsPeriodType periodType,
                                                 int columnIndex,
                                                 boolean isValue)
        Retrieve analytics table data
        Parameters:
        columnResult - existing column result to use for result comptuing
        tableFilter - overall configured table filter
        filter - used search filters and aggregations to compute data
        period - selected AnalyticsPeriod
        periodType - selected AnalyticsPeriodType
        columnIndex - column index in the configured table filter
        isValue - whether the filter to compute is for value or threshold
        Returns:
        computed analytics table column data
      • computePercentageChartData

        PercentageChartValue computePercentageChartData​(AnalyticsFilter filter,
                                                        AnalyticsPeriod currentPeriod,
                                                        AnalyticsPeriod previousPeriod,
                                                        boolean hasLimitAggregation)
        Retrieve analytics percentage chart data
        Parameters:
        filter - used search filters and aggregations to compute data
        currentPeriod - current period of time
        previousPeriod - previous period of time to compare with
        hasLimitAggregation - whether aggregations has limit aggregation or not
        Returns:
        PercentageChartValue containing current and previous values and thresholds
      • retrieveMapping

        Set<StatisticFieldMapping> retrieveMapping​(boolean forceRefresh)
        Parameters:
        forceRefresh - whether force refresh from ES or not
        Returns:
        a Set of ES mapping fields
      • retrieveFieldValues

        List<StatisticFieldValue> retrieveFieldValues​(String field,
                                                      int limit)
        Retrieve values of a selected field
        Parameters:
        field - name of esField
        limit - limit of results to retrieve
        Returns:
        List of field values of type StatisticFieldValue
      • getAdministratorsPermissions

        List<String> getAdministratorsPermissions()
        Returns:
        the analytics permission expression
      • getViewAllPermissions

        List<String> getViewAllPermissions()
        Returns:
        the List of permission expression of users that can access all analytics datas
      • getViewPermissions

        List<String> getViewPermissions()
        Returns:
        the List of permission expression of users that can access their (and their spaces they are member of) analytics datas
      • getUIWatcher

        StatisticWatcher getUIWatcher​(String name)
        Parameters:
        name - corresponding UI watcher name, see StatisticWatcher#getName()
        Returns:
        StatisticWatcher having switch corresponding name
      • addUIWatcherPlugin

        void addUIWatcherPlugin​(StatisticUIWatcherPlugin uiWatcherPlugin)
        Add watcher plugin
        Parameters:
        uiWatcherPlugin - Kernel component plugin to add