Opencast provides an extensible mechanism to make statistics data available to the Opencast administrative user interface and also to third-party applications using the External API.
The overall idea is that sources of statistics data (StatisticsProvider) are managed at a central service (StatisticsService). The StatisticsService supports a minimal set of common attributes, in particular, the type of the StatisticsProvider which implies a data format and available parametrization.
A client can use the StatisticsService to retrieve a list of all available StatisticsProviders. The data format as well as the parameters supported by the StatisticsProviders are implied by the type of the provider. This information is used by the client to decide whether it can visualize the statistics data and which component has to be used for visualization.
The StatisticsService consists of the following modules:
statistics-service-apiAn API module defining the core StatisticsService and StatisticsProvider functions.
statistics-service-implThe default implementation of the StatisticsService as an OSGi service.
statistics-service remoteThe remote implementation of the StatisticsService.
statistics-provider-influxAn implementation of the StatisticsProvider for InfluxDB
statistics-provider-randomAn implementation of the StatisticsProvider for testing and demo purposes.
Interfaces & Classes
StatisticsService implements the two interfaces
This interface is used by
StatisticsProvider implementations to register and unregister themselves at the
|addProvider||Register a statistics provider at the statistics service|
|removeProvider||Unregister a statistics provider from the statistics service|
This is the interface used by clients of the statistics service to retrieve a list of registered statistics providers
|getProviders||Retrieve lists of statistics providers|
StatisticsProvider interface provides access to common attributes of the statistics providers:
|getId||Returns the unique identifier of the statistics provider|
|getType||Returns the type of the statistics provider|
|getName||Returns the displayable name of the statistics provider|
|getDescription||Returns the displayable description of the statistics provider|
whereas supported resource types are
|EPISODE||The statistics data relates to an episode|
|SERIES||The statistics data relates to a series|
|ORGANIZATION||The statistics data does not relate to a particular object|
The StatisticsService API is supposed to be an internal Opencast interface. External clients can use the External API to access Opencast statistics and the Opencast Admin UI has access through the Admin UI facade.
The External API supports Opencast statistics by its Statistics API endpoint.
The Admin UI supports Opencast statistics at various levels:
|modules/admin-ui/src/main/java/org/opencastproject/adminui/endpoint/StatisticsEndpoint.java||Implementation of the Statistics endpoint for the Admin UI facade|
|modules/admin-ui/src/main/webapp/scripts/shared/resources/statisticsResource.js||Abstracts StatisticsEndpoint for use in the web application|