Interface AnalyticsService


@Service public interface AnalyticsService
  • Method Details

    • 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
    • retrieveData

      List<StatisticData> retrieveData(AnalyticsFilter searchFilter)
      Retrieve data using search filters
      Parameters:
      searchFilter -
      Returns:
      List of StatisticData
    • 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
    • getUIWatchers

      List<StatisticWatcher> getUIWatchers()
      Returns:
      List of StatisticWatcher containing DOM selectors of elements to watch
    • getUIWatcher

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

      void addUIWatcher(StatisticWatcher uiWatcher)
      Parameters:
      uiWatcher - StatisticWatcher containing DOM selector of elements to watch