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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AnnotatedReport(String id)
Creates a new instance ofAnnotatedReport
.AnnotatedReport(String id, edu.hm.hafner.analysis.Report report)
Creates a new instance ofAnnotatedReport
.AnnotatedReport(String id, edu.hm.hafner.analysis.Report report, io.jenkins.plugins.forensics.blame.Blames blames)
Creates a new instance ofAnnotatedReport
.AnnotatedReport(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 ofAnnotatedReport
.AnnotatedReport(String id, Iterable<AnnotatedReport> reports)
Creates a new instance ofAnnotatedReport
as an aggregation of the specified reports.AnnotatedReport(String id, List<AnnotatedReport> reports)
Creates a new instance ofAnnotatedReport
as an aggregation of the specified reports.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(AnnotatedReport other)
Appends the specifiedreport
to this report.void
add(AnnotatedReport other, String actualId)
Appends the specifiedreport
to this report.void
addAll(Collection<AnnotatedReport> reports)
Appends the specifiedreports
to this report.void
addRepositoryStatistics(io.jenkins.plugins.forensics.miner.RepositoryStatistics statistics)
Adds the specified repository statistics to this report.io.jenkins.plugins.forensics.blame.Blames
getBlames()
Returns the aggregated blames for all reports.String
getId()
Returns the ID of this report.List<IssueApi>
getIssues()
Returns a read only view for the issues of this report.edu.hm.hafner.analysis.Report
getReport()
Returns the aggregated report.Map<String,Integer>
getSizeOfOrigin()
Returns the number of issues per origin.io.jenkins.plugins.forensics.miner.RepositoryStatistics
getStatistics()
Returns the aggregated statistics for all reports.void
logInfo(String format, Object... args)
Logs the specified information message.int
size()
Returns the total number of issues of the aggregated reports.
-
-
-
Constructor Detail
-
AnnotatedReport
public AnnotatedReport(String id)
Creates a new instance ofAnnotatedReport
. 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 ofAnnotatedReport
. The blames will be initialized empty.- Parameters:
id
- the ID of the reportreport
- 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 ofAnnotatedReport
.- Parameters:
id
- ID of the reportreport
- report with issuesblames
- 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 ofAnnotatedReport
.- Parameters:
id
- ID of the reportreport
- report with issuesblames
- author and commit information for affected filesstatistics
- repository statistics for affected files
-
AnnotatedReport
public AnnotatedReport(@CheckForNull String id, List<AnnotatedReport> reports)
Creates a new instance ofAnnotatedReport
as an aggregation of the specified reports.- Parameters:
id
- the ID of the reportreports
- the reports to aggregate
-
AnnotatedReport
public AnnotatedReport(@CheckForNull String id, Iterable<AnnotatedReport> reports)
Creates a new instance ofAnnotatedReport
as an aggregation of the specified reports.- Parameters:
id
- the ID of the reportreports
- the reports to aggregate
-
-
Method Detail
-
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 stringargs
- 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 specifiedreports
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 specifiedreport
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 appendactualId
- the ID to use when adding the report
-
add
public void add(AnnotatedReport other)
Appends the specifiedreport
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
-
-