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
|Register a statistics provider at the statistics service
|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
|Retrieve lists of statistics providers
StatisticsProvider interface provides access to common attributes of the statistics providers:
|Returns the unique identifier of the statistics provider
|Returns the type of the statistics provider
ResourceType of the statistics provider
|Returns the displayable name of the statistics provider
|Returns the displayable description of the statistics provider
whereas supported resource types are
|The statistics data relates to an episode
|The statistics data relates to a series
|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:
|Implementation of the Statistics endpoint for the Admin UI facade
|Abstracts StatisticsEndpoint for use in the web application