Package org.dspace.app.rest.utils
Class UsageReportUtils
java.lang.Object
org.dspace.app.rest.utils.UsageReportUtils
This is the Service dealing with the
UsageReportRest logic- Author:
- Maria Verdonck (Atmire) on 08/06/2020
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateUsageReport(Context context, DSpaceObject dso, String reportId) Creates the stat different stat usage report based on the report id.getUsageReportsOfDSO(Context context, DSpaceObject dso) Get list of usage reports that are applicable to the DSO (of given UUID)
-
Field Details
-
TOTAL_VISITS_REPORT_ID
- See Also:
-
TOTAL_VISITS_PER_MONTH_REPORT_ID
- See Also:
-
TOTAL_DOWNLOADS_REPORT_ID
- See Also:
-
TOP_COUNTRIES_REPORT_ID
- See Also:
-
TOP_CITIES_REPORT_ID
- See Also:
-
-
Constructor Details
-
UsageReportUtils
public UsageReportUtils()
-
-
Method Details
-
getUsageReportsOfDSO
public List<UsageReportRest> getUsageReportsOfDSO(Context context, DSpaceObject dso) throws SQLException, ParseException, org.apache.solr.client.solrj.SolrServerException, IOException Get list of usage reports that are applicable to the DSO (of given UUID)- Parameters:
context- DSpace contextdso- DSpaceObject we want all available usage reports of- Returns:
- List of usage reports, applicable to the given DSO
- Throws:
SQLExceptionParseExceptionorg.apache.solr.client.solrj.SolrServerExceptionIOException
-
createUsageReport
public UsageReportRest createUsageReport(Context context, DSpaceObject dso, String reportId) throws ParseException, org.apache.solr.client.solrj.SolrServerException, IOException Creates the stat different stat usage report based on the report id. If the report id or the object uuid is invalid, an exception is thrown.- Parameters:
context- DSpace contextdso- DSpace object we want a stat usage report onreportId- Type of usage report requested- Returns:
- Rest object containing the stat usage report, see
UsageReportRest - Throws:
ParseExceptionorg.apache.solr.client.solrj.SolrServerExceptionIOException
-