Class AnnotatedReport
java.lang.Object
io.jenkins.plugins.analysis.core.steps.AnnotatedReport
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionvoid
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
Returns the aggregated blames for all reports.getId()
Returns the ID of this report.Returns a read only view for the issues of this report.edu.hm.hafner.analysis.Report
Returns the aggregated report.Returns the number of issues per origin.io.jenkins.plugins.forensics.miner.RepositoryStatistics
Returns the aggregated statistics for all reports.void
Logs the specified information message.int
size()
Returns the total number of issues of the aggregated reports.
-
Constructor Details
-
AnnotatedReport
Creates a new instance ofAnnotatedReport
. Blames and report will be initialized empty.- Parameters:
id
- the ID of the report
-
AnnotatedReport
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
Creates a new instance ofAnnotatedReport
as an aggregation of the specified reports.- Parameters:
id
- the ID of the reportreports
- the reports to aggregate
-
AnnotatedReport
Creates a new instance ofAnnotatedReport
as an aggregation of the specified reports.- Parameters:
id
- the ID of the reportreports
- the reports to aggregate
-
-
Method Details
-
getSizeOfOrigin
Returns the number of issues per origin.- Returns:
- number of issues per origin
-
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
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
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
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
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
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
-