Interface StatisticsService

All Superinterfaces:
com.appiancorp.services.ContextSensitiveService, Service

public interface StatisticsService extends com.appiancorp.services.ContextSensitiveService

This interface provides services for other applications using methods related to collaboration download statistics

Methods of service classes can all throw the unchecked exception ServiceException if any system-level error (for example, server failure) occurs, and will in general throw a checked exception (InvalidXXXException) when an entity to be retrieved is inaccessible, instead of returning null. Exceptions to this paradigm (including the use of ResultList as described below) are noted. All checked exceptions extend AppianException.

It may be necessary to retrieve a subset of results as opposed to an entire collection, and also to sort the subset by some property of the returned object. "Paging" methods which return a ResultPage are provided in certain instances for this purpose. The ResultPage will contain the sorted subset of results (via Result.getResults()), and the total number of items in the available result set (via ResultPage.getAvailableItems()).

It may also be necessary to retrieve some results, even if all results cannot be retrieved (for instance, some of the entities corresponding to a list of entity IDs may no longer exist). Methods which return a ResultList are provided for this purpose. The Result.getResults() method in this case will return all results which can be retrieved. In addition, there will be a list of result codes (ResultList.getResultCodes()) that represent the successful retrieval of an entity, or, if the entity could not be retrieved, the reason for the failure. See the CODE_XXX constants in ResultList for details.

  • Field Details

  • Method Details

    • getTotalDownloads

      Long getTotalDownloads()
      Gets the total number of downloads from the collaboration application to date
      Returns:
      the total number of downloads
      Throws:
      ServiceException - if any system-level error occurs
    • getNumberDownloads

      DownloadStatistics[] getNumberDownloads(Long days)
      Gets the number of downloads in the last days_ days
      Parameters:
      days - the number of days in the query
      Returns:
      a list of DownloadStatistics objects, with the downloadDate and numberOfDownloads fields populated. Each DownloadStatistics object represents one day of download information.
      Throws:
      ServiceException - if any system-level error occurs
    • getNumberDownloadsPaging

      ResultPage getNumberDownloadsPaging(Long days_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Gets the number of downloads in the last days_ days
      Parameters:
      days_ - the number of days in the query
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_NUMBER_OF_DOWNLOADS_NUMDOWNLOADS or SORT_BY_DOWNLOAD_DATE_NUMDOWNLOADS)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DownloadStatistics objects, with the downloadDate and numberOfDownloads fields populated. Each DownloadStatistics object represents one day of download information.
      Throws:
      ServiceException - if any system-level error occurs
    • getGeneralUserDownloadStatistics

      UserStatistics getGeneralUserDownloadStatistics()
      Gets application download statistics
      Returns:
      a UserStatistics object encapsulating application download statistics, with the numberOfUsersWhoHaveDownloaded field populated.
      Throws:
      ServiceException - if any system-level error occurs
    • getCommunitiesWithMostDownloads

      DownloadStatistics[] getCommunitiesWithMostDownloads(Long num_)
      Gets the top num_ communities with the most downloads
      Parameters:
      num_ - the top number of communities to return
      Returns:
      a list of DownloadStatistics objects, with the communityName and numberOfDownloads fields populated. Each DownloadStatistics object represents a community's download information
      Throws:
      ServiceException - if any system-level error occurs
    • getCommunitiesWithMostDownloadsPaging

      ResultPage getCommunitiesWithMostDownloadsPaging(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Gets the communities with the most downloads
      Parameters:
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_COMMUNITY_NAME or SORT_BY_NUMBER_OF_DOWNLOADS)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DownloadStatistics objects, with the communityName and numberOfDownloads fields populated. Each DownloadStatistics object represents a community's download information.
      Throws:
      ServiceException - if any system-level error occurs
    • getKnowledgeCentersWithMostDownloads

      DownloadStatistics[] getKnowledgeCentersWithMostDownloads(Long num_)
      Gets the top num_ knowledge centers with the most downloads
      Parameters:
      num_ - the top number of knowledge centers to return
      Returns:
      a list of DownloadStatistics objects, with the knowledgeCenterName and numberOfDownloads fields populated. Each DownloadStatistics object represents a knowledge center's download information.
      Throws:
      ServiceException - if any system-level error occurs
    • getKnowledgeCentersWithMostDownloadsPaging

      ResultPage getKnowledgeCentersWithMostDownloadsPaging(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Gets the knowledge centers with the most downloads
      Parameters:
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_KNOWLEDGE_CENTER_NAME or SORT_BY_NUMBER_OF_DOWNLOADS)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DownloadStatistics objects, with the knowledgeCenterName and numberOfDownloads fields populated. Each DownloadStatistics object represents a knowledge center's download information.
      Throws:
      ServiceException - if any system-level error occurs
    • getDownloadsByHour

      DownloadStatistics[] getDownloadsByHour()
      Gets the number of downloads for each hour
      Returns:
      a list of DownloadStatistics objects. Each DownloadStatistics object represents download information for an hour, with the downloadHourOfDay and numberOfDownloads fields populated
      Throws:
      ServiceException - if any system-level error occurs
    • getDownloadsByHourPaging

      ResultPage getDownloadsByHourPaging(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Gets the number of downloads for each hour
      Parameters:
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_DOWNLOAD_HOUR_OF_DAY or SORT_BY_NUMBER_OF_DOWNLOADS)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DownloadStatistics objects, with the downloadHourOfDay and numberOfDownloads fields populated. Each DownloadStatistics object represents download information for an hour.
      Throws:
      ServiceException - if any system-level error occurs
    • getDownloadsByType

      DownloadStatistics[] getDownloadsByType()
      Gets the number of downloads by document type
      Returns:
      a list of DownloadStatistics objects, with the documentExtension and numberOfDownloads fields populated. Each DownloadStatistics object represents download information for a document extension.
      Throws:
      ServiceException - if any system-level error occurs
    • getDownloadsByTypePaging

      ResultPage getDownloadsByTypePaging(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Gets the number of downloads by document type
      Parameters:
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_DOCUMENT_EXTENSION or SORT_BY_NUMBER_OF_DOWNLOADS)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DownloadStatistics objects, with the documentExtension and numberOfDownloads fields populated. Each DownloadStatistics object represents download information for a document extension.
      Throws:
      ServiceException - if any system-level error occurs
    • getTopDocumentsByDownloads

      DocumentStatistics[] getTopDocumentsByDownloads(Long num_)
      Gets the top num_ documents in terms of how often they have been downloaded
      Parameters:
      num_ - the top number of documents to return
      Returns:
      a list of DocumentStatistics objects which represent the most downloaded documents, with the normal DocumentService.getDocuments(java.lang.Long[]) fields and the numberOfDownloads field populated
      Throws:
      ServiceException - if any system-level error occurs
    • getTopDocumentsByDownloadsPaging

      ResultPage getTopDocumentsByDownloadsPaging(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Gets the top N documents with the most downloads
      Parameters:
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_NUMBER_OF_DOWNLOADS_DOCUMENTS or any of the SORT_BY_XXX fields under Document)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DocumentStatistics objects which represent the most downloaded documents, with the normal DocumentService.getDocuments(java.lang.Long[]) fields and the numberOfDownloads field populated
      Throws:
      ServiceException - if any system-level error occurs
    • getDownloadsByWeekDays

      DownloadStatistics[] getDownloadsByWeekDays()
      Gets the number of downloads by weekdays
      Returns:
      a list of DownloadStatistics objects, with the downloadDayOfWeek and numberOfDownloads fields populated. Each DownloadStatistics object represents download information for a weekday.
      Throws:
      ServiceException - if any system-level error occurs
    • getDownloadsByWeekDaysPaging

      ResultPage getDownloadsByWeekDaysPaging(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      Gets the number of downloads by weekdays
      Parameters:
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_DOWNLOAD_DAY_OF_WEEK or SORT_BY_NUMBER_OF_DOWNLOADS)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DownloadStatistics objects, with the downloadDayOfWeek and numberOfDownloads fields populated. Each DownloadStatistics object represents download information for a weekday.
      Throws:
      ServiceException - if any system-level error occurs
    • getUsersByDownloadedDocument

      DownloadStatistics[] getUsersByDownloadedDocument(Long doid_) throws InvalidDocumentException
      Gets the users who have downloaded a specific document
      Parameters:
      doid_ - the unique ID of the document
      Returns:
      a list of DownloadStatistics objects, with the downloader field populated. Each DownloadStatistics object represents one user who downloaded the document
      Throws:
      ServiceException - if any system-level error occurs
      InvalidDocumentException - if the document does not exist
    • getUsersByDownloadedContent

      DownloadStatistics[] getUsersByDownloadedContent(Long contentId_) throws InvalidDocumentException
      Gets the users who have downloaded a specific document, expressed by content id. This allows one particular version of a document to be examined (use ContentService's getVersionId for this id).
      Parameters:
      contentId_ - the unique content ID of the document
      Returns:
      a list of DownloadStatistics objects, with the downloader field populated. Each DownloadStatistics object represents one user who downloaded the document
      Throws:
      ServiceException - if any system-level error occurs
      InvalidDocumentException - if the document does not exist
    • getUsersByDownloadedDocumentPaging

      ResultPage getUsersByDownloadedDocumentPaging(Long docId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidDocumentException
      Gets the users who have downloaded a specific document
      Parameters:
      docId_ - the unique ID of the document
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_DOWNLOADER)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DownloadStatistics objects, with the downloader field populated. Each DownloadStatistics object represents one user who downloaded the document
      Throws:
      ServiceException - if any system-level error occurs
      InvalidDocumentException - if the document does not exist
    • getUsersByDownloadedContentPaging

      ResultPage getUsersByDownloadedContentPaging(Long contentId_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidDocumentException
      Gets the users who have downloaded a specific document, expressed by content id. This allows one particular version of a document to be examined (use ContentService's getVersionId for this id).
      Parameters:
      docId_ - the unique ID of the document
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_DOWNLOADER)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DownloadStatistics objects, with the downloader field populated. Each DownloadStatistics object represents one user who downloaded the document
      Throws:
      ServiceException - if any system-level error occurs
      InvalidDocumentException - if the document does not exist
    • getPopularDocumentsKnowledgeCenter

      DocumentStatistics[] getPopularDocumentsKnowledgeCenter(Long kcid_, Long number_) throws InvalidKnowledgeCenterException
      Gets the number_ most popular documents in a specific knowledge center
      Parameters:
      kcid_ - the unique ID of the knowledge center
      number_ - the top number to documents to return
      Returns:
      an array of DocumentStatistics objects representing the most popular documents, with the normal DocumentService.getDocuments(java.lang.Long[]) fields and the numberOfDownloads field populated
      Throws:
      ServiceException - if any system-level error occurs
      InvalidKnowledgeCenterException - Never thrown. Is only declared for backwards compatibility.
    • getPopularDocumentsKnowledgeCenterPaging

      ResultPage getPopularDocumentsKnowledgeCenterPaging(Long kcid_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidKnowledgeCenterException
      Gets the most popular documents in a specific knowledge center
      Parameters:
      kcid_ - the unique ID of the knowledge center
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_NUMBER_OF_DOWNLOADS_DOCUMENTS or any of the SORT_BY_XXX fields under Document)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DocumentStatistics objects representing the most popular documents, with the normal DocumentService.getDocuments(java.lang.Long[]) fields and the numberOfDownloads field populated
      Throws:
      ServiceException - if any system-level error occurs
      InvalidKnowledgeCenterException - Never thrown. Is only declared for backwards compatibility.
    • getDownloadsByDayForKnowledgeCenter

      DownloadStatistics[] getDownloadsByDayForKnowledgeCenter(Long kcid_, Long days_) throws InvalidKnowledgeCenterException
      Gets the number of downloads for the last days_ day for a specified knowledge center
      Parameters:
      kcid_ - the unique ID of the knowledge center
      days_ - the number of days in the query
      Returns:
      a list of DownloadStatistics objects, with the downloadDate and numberOfDownloads fields populated. Each DownloadStatistics object represents one day of download information for the knowledge center
      Throws:
      ServiceException - if any system-level error occurs
      InvalidKnowledgeCenterException - Never thrown. Is only declared for backwards compatibility.
    • getDownloadsByDayForKnowledgeCenterPaging

      ResultPage getDownloadsByDayForKnowledgeCenterPaging(Long kcid_, Long days_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidKnowledgeCenterException
      Gets the number of downloads for the last N day for a specified knowledge center
      Parameters:
      kcid_ - the unique ID of the knowledge center
      days_ - the number of days in the query
      startIndex_ - the index into the collection of total results at which to start. Negative numbers are treated as zeros.
      batchSize_ - the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted (SORT_BY_DOWNLOAD_DATE or SORT_BY_NUMBER_OF_DOWNLOADS)
      sortOrder_ - The order in which to sort the results. This is either Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing a list of DownloadStatistics objects, with the downloadDate and numberOfDownloads fields populated. Each DownloadStatistics object represents one day of download information for the knowledge center
      Throws:
      ServiceException - if any system-level error occurs
      InvalidKnowledgeCenterException - Never thrown. Is only declared for backwards compatibility.