Interface AnalyticsManager


  • @Role
    @Unstable
    public interface AnalyticsManager
    The interface for the AnalyticManger.
    Since:
    1.0
    Version:
    $Id$
    • Method Detail

      • requestData

        com.fasterxml.jackson.databind.JsonNode requestData​(Map<String,​String> parameters,
                                                            Map<String,​String> filters,
                                                            String jsonNormaliserHint)
                                                     throws IOException
        Request specific analytics data.
        Parameters:
        jsonNormaliserHint - hint to select the json normaliser
        parameters - a list of key, value pairs that will represent the parameters for the request
        filters - holds the criteria for filtering a dataset
        Returns:
        a jsonNode with the processed data
        Throws:
        IOException
      • aggregate

        void aggregate​(String hint)
        Aggregate data from multiple endpoints using a specific aggregator.
        Parameters:
        hint - which aggregator you want to use.
      • handleData

        org.apache.commons.lang3.tuple.Pair<Integer,​List<com.fasterxml.jackson.databind.JsonNode>> handleData​(String hint,
                                                                                                                    String asc,
                                                                                                                    String sortField,
                                                                                                                    Map<String,​String> filters,
                                                                                                                    int pageSize,
                                                                                                                    int pageCount)
                                                                                                             throws com.fasterxml.jackson.core.JsonProcessingException,
                                                                                                                    com.xpn.xwiki.XWikiException
        Handles data aggregated from the analytics applications and stored directly in XWiki.
        Parameters:
        hint - for the aggregator used
        asc - if you want the data to be in ascending or descending order
        sortField - the field that you want to sort after
        filters - map where the keys are the fields and the values are the text that you want to filter after
        pageSize - how many elements are on a page
        pageCount - current page offset
        Returns:
        a pair where the first element is the total number of entries that meet the criteria(filter), and the second element is a slice of the original list paginated using pageSize and pageCount
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
        com.xpn.xwiki.XWikiException