Class StatisticsExportServiceImpl
java.lang.Object
org.opencastproject.statistics.export.impl.StatisticsExportServiceImpl
- All Implemented Interfaces:
StatisticsExportService,org.osgi.service.cm.ManagedService
public class StatisticsExportServiceImpl
extends Object
implements StatisticsExportService, org.osgi.service.cm.ManagedService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) voiddeactivate(org.osgi.service.component.ComponentContext cc) getCSV(StatisticsProvider provider, String resourceId, Instant from, Instant to, DataResolution dataResolution, ElasticsearchIndex index, ZoneId zoneId) Get a CSV representation for the query result based on the given parameters.getCSV(StatisticsProvider provider, String resourceId, Instant from, Instant to, DataResolution dataResolution, ElasticsearchIndex index, ZoneId zoneId, boolean fullMetadata, DetailLevel detailLevel, int limit, int offset, Map<String, String> filters) Get a CSV representation for the query result based on the given parameters.voidsetAssetManager(AssetManager assetManager) voidsetIndexService(IndexService indexService) voidsetSecurityService(SecurityService securityService) voidsetStatisticsService(StatisticsService statisticsService) voidupdated(Dictionary<String, ?> dictionary)
-
Constructor Details
-
StatisticsExportServiceImpl
public StatisticsExportServiceImpl()
-
-
Method Details
-
updated
- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedService
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) -
deactivate
public void deactivate(org.osgi.service.component.ComponentContext cc) -
setIndexService
-
setStatisticsService
-
setSecurityService
-
setAssetManager
-
getCSV
public String getCSV(StatisticsProvider provider, String resourceId, Instant from, Instant to, DataResolution dataResolution, ElasticsearchIndex index, ZoneId zoneId) throws SearchIndexException, UnauthorizedException, NotFoundException Description copied from interface:StatisticsExportServiceGet a CSV representation for the query result based on the given parameters.- Specified by:
getCSVin interfaceStatisticsExportService- Parameters:
provider- The provider to get the data from.resourceId- The id of the resource to get the data for.from- The start date of the time range to get the data for.to- The end date of the time range to get the data for.dataResolution- The data resolution.index- The index to get event or series meta data from.zoneId- The ZoneId to use for date formatting.- Returns:
- The data as CSV.
- Throws:
SearchIndexException- If the search index cannot be queried.UnauthorizedException- If the user is not authorized to get the desired data.NotFoundException- If the resource identified by resourceId could not be found.
-
getCSV
public String getCSV(StatisticsProvider provider, String resourceId, Instant from, Instant to, DataResolution dataResolution, ElasticsearchIndex index, ZoneId zoneId, boolean fullMetadata, DetailLevel detailLevel, int limit, int offset, Map<String, String> filters) throws SearchIndexException, UnauthorizedException, NotFoundExceptionDescription copied from interface:StatisticsExportServiceGet a CSV representation for the query result based on the given parameters.- Specified by:
getCSVin interfaceStatisticsExportService- Parameters:
provider- The provider to get the data from.resourceId- The id of the resource to get the data for.from- The start date of the time range to get the data for.to- The end date of the time range to get the data for.dataResolution- The data resolution.index- The index to get event or series meta data from.zoneId- The ZoneId to use for date formatting.fullMetadata- When true, creates a full export with all available meta data fields.limit- limit to use for pagination. Pass 0 for unlimited (not recommeded).offset- offset to use for pagination.filters- filters to apply when searching for events/series.- Returns:
- The data as CSV.
- Throws:
SearchIndexException- If the search index cannot be queried.UnauthorizedException- If the user is not authorized to get the desired data.NotFoundException- If the resource identified by resourceId could not be found.
-