Class AnnotatedReport

java.lang.Object
io.jenkins.plugins.analysis.core.steps.AnnotatedReport
All Implemented Interfaces:
Serializable

public class AnnotatedReport extends Object implements Serializable
A report of issues and the associated blame information, i.e. author and commit information of the SCM.
Author:
Ullrich Hafner
See Also:
  • Constructor Details

    • AnnotatedReport

      public AnnotatedReport(String id)
      Creates a new instance of AnnotatedReport. Blames and report will be initialized empty.
      Parameters:
      id - the ID of the report
    • AnnotatedReport

      public AnnotatedReport(@CheckForNull String id, edu.hm.hafner.analysis.Report report)
      Creates a new instance of AnnotatedReport. The blames will be initialized empty.
      Parameters:
      id - the ID of the report
      report - report with issues
    • AnnotatedReport

      public AnnotatedReport(@CheckForNull String id, edu.hm.hafner.analysis.Report report, io.jenkins.plugins.forensics.blame.Blames blames)
      Creates a new instance of AnnotatedReport.
      Parameters:
      id - ID of the report
      report - report with issues
      blames - author and commit information for affected files
    • AnnotatedReport

      public AnnotatedReport(@CheckForNull String id, edu.hm.hafner.analysis.Report report, io.jenkins.plugins.forensics.blame.Blames blames, io.jenkins.plugins.forensics.miner.RepositoryStatistics statistics)
      Creates a new instance of AnnotatedReport.
      Parameters:
      id - ID of the report
      report - report with issues
      blames - author and commit information for affected files
      statistics - repository statistics for affected files
    • AnnotatedReport

      public AnnotatedReport(@CheckForNull String id, List<AnnotatedReport> reports)
      Creates a new instance of AnnotatedReport as an aggregation of the specified reports.
      Parameters:
      id - the ID of the report
      reports - the reports to aggregate
    • AnnotatedReport

      public AnnotatedReport(@CheckForNull String id, Iterable<AnnotatedReport> reports)
      Creates a new instance of AnnotatedReport as an aggregation of the specified reports.
      Parameters:
      id - the ID of the report
      reports - the reports to aggregate
  • Method Details

    • getSizeOfOrigin

      public Map<String,Integer> getSizeOfOrigin()
      Returns the number of issues per origin.
      Returns:
      number of issues per origin
    • getIssues

      public List<IssueApi> getIssues()
      Returns a read only view for the issues of this report.
      Returns:
      the issues
    • getReport

      public edu.hm.hafner.analysis.Report getReport()
      Returns the aggregated report.
      Returns:
      the aggregated report
    • getBlames

      public io.jenkins.plugins.forensics.blame.Blames getBlames()
      Returns the aggregated blames for all reports.
      Returns:
      the aggregated blames
    • getStatistics

      public io.jenkins.plugins.forensics.miner.RepositoryStatistics getStatistics()
      Returns the aggregated statistics for all reports.
      Returns:
      the aggregated statistics
    • getId

      public String getId()
      Returns the ID of this report.
      Returns:
      the ID
    • size

      public int size()
      Returns the total number of issues of the aggregated reports.
      Returns:
      total number of issues
    • logInfo

      @FormatMethod public void logInfo(String format, Object... args)
      Logs the specified information message. Use this method to log any useful information when composing this report.
      Parameters:
      format - A format string
      args - Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.
    • addAll

      public void addAll(Collection<AnnotatedReport> reports)
      Appends the specified reports to this report. This report will then contain the issues of all specified reports, in the same order. The reports will be added with the ID of the added report.
      Parameters:
      reports - the reports to append
    • add

      public void add(AnnotatedReport other, String actualId)
      Appends the specified report to this report. This report will then contain the issues of the specified reports, appended to the end and in the same order. The report will be added with the specified ID.
      Parameters:
      other - the other report to append
      actualId - the ID to use when adding the report
    • add

      public void add(AnnotatedReport other)
      Appends the specified report to this report. This report will then contain the issues of the specified reports, appended to the end and in the same order. The report will be added with the default ID of this report.
      Parameters:
      other - the other report to append
    • addRepositoryStatistics

      public void addRepositoryStatistics(io.jenkins.plugins.forensics.miner.RepositoryStatistics statistics)
      Adds the specified repository statistics to this report.
      Parameters:
      statistics - the additional statistic