public interface

InsightReport

com.atlassian.bitbucket.codeinsights.report.InsightReport

Class Overview

Represents an InsightReport.

Summary

Public Methods
@Nonnull String getCommitId()
The commit id for which this report was registered against.
@Nonnull Date getCreatedDate()
The date this report was created.
@Nonnull List<InsightReportData> getData()
Free form data stored with this report.
@Nonnull Optional<String> getDetails()
Details for the report.
@Nonnull String getKey()
Unique key for the report.
@Nonnull Optional<URI> getLink()
Callback link.
@Nonnull Optional<URI> getLogoUrl()
URL to fetch the icon for the report from.
@Nonnull Optional<String> getReporter()
Name of the tool that produced the report, this may contain characters that are unsafe to display without escaping.
@Nonnull Repository getRepository()
Repository that the report is attached to.
@Nonnull Optional<InsightResult> getResult()
The result of the report and by extension the job that produced the report.
@Nonnull String getTitle()
Title of the report.

Public Methods

@Nonnull public String getCommitId ()

The commit id for which this report was registered against.

Returns
  • the commit id

@Nonnull public Date getCreatedDate ()

The date this report was created.

Returns
  • The date this report was created, the date would be the date of the node servicing the request to create the report

@Nonnull public List<InsightReportData> getData ()

Free form data stored with this report. The data is defined by the caller, and as such no guarantees are made on the shape of it. The order of the array is the same as it was when the report was stored.

Returns
  • the data, if no data is stored an empty list will be returned

@Nonnull public Optional<String> getDetails ()

Details for the report. This is typically a longer description of the report or longer information for the report. If the string is too long it will be either trimmed or truncated at the time of display.

Returns
  • an Optional containing the stored details, or empty() if no details were recorded

@Nonnull public String getKey ()

Unique key for the report. This report is typically a reporter prefixed string and say a CI system plan key. The key should typically not contain the build number as that would generate multiple reports for the same commit if the build is re-run. There can only be one report with a given key for a commit.

Returns
  • key for the report

@Nonnull public Optional<URI> getLink ()

Callback link. This link is typically a link back to the reporter that produced the report. For the case of CI system it would link back to the build that produced the report.

Returns
  • an Optional containing the link, or empty() if no link was stored

@Nonnull public Optional<URI> getLogoUrl ()

URL to fetch the icon for the report from.

Returns
  • an Optional containing the url or empty() if no icon is to be displayed

@Nonnull public Optional<String> getReporter ()

Name of the tool that produced the report, this may contain characters that are unsafe to display without escaping.

Returns
  • an Optional containing the reporter name or empty() if the report has no reporter

@Nonnull public Repository getRepository ()

Repository that the report is attached to.

Returns
  • the repository for this report

@Nonnull public Optional<InsightResult> getResult ()

The result of the report and by extension the job that produced the report. The semantic meaning of what a 'FAILED' report means is up to the producer of the report.

Returns
  • an Optional containing the result or empty() if the report does not have a result

@Nonnull public String getTitle ()

Title of the report.

Returns
  • title of the report, this may contain characters that are unsafe to display without escaping