Class UsageReportUtils

java.lang.Object
org.dspace.app.rest.utils.UsageReportUtils

@Component public class UsageReportUtils extends Object
This is the Service dealing with the UsageReportRest logic
Author:
Maria Verdonck (Atmire) on 08/06/2020
  • Field Details

  • 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 context
      dso - DSpaceObject we want all available usage reports of
      Returns:
      List of usage reports, applicable to the given DSO
      Throws:
      SQLException
      ParseException
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • 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 context
      dso - DSpace object we want a stat usage report on
      reportId - Type of usage report requested
      Returns:
      Rest object containing the stat usage report, see UsageReportRest
      Throws:
      ParseException
      org.apache.solr.client.solrj.SolrServerException
      IOException