Class UsageReportUtils


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

      • UsageReportUtils

        public UsageReportUtils()
    • Method Detail

      • getUsageReportsOfDSO

        public List<UsageReportRest> getUsageReportsOfDSO​(org.dspace.core.Context context,
                                                          org.dspace.content.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​(org.dspace.core.Context context,
                                                 org.dspace.content.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