public interface

InsightAnnotation

com.atlassian.bitbucket.codeinsights.annotation.InsightAnnotation

Summary

Public Methods
@Nonnull Optional<String> getExternalId()
If present, represents the id in the external system.
int getLine()
Line at which the annotation would be displayed.
@Nonnull Optional<URI> getLink()
Callback link.
@Nonnull String getMessage()
Message for the annotation.
@Nonnull String getPath()
Path of the file against which the annotation is created.
@Nonnull String getReportKey()
The report key of the report to which this annotation belongs
@Nonnull AnnotationSeverity getSeverity()
The severity of the annotation.
@Nonnull Optional<AnnotationType> getType()
The type of an annotation.
boolean isOutdated()
If requested for a pull request, this property indicates that the file to which this annotation was added has also been modified on the target branch of the pull request.

Public Methods

@Nonnull public Optional<String> getExternalId ()

If present, represents the id in the external system.

Returns
  • the id, or empty if no value was supplied

public int getLine ()

Line at which the annotation would be displayed.

Returns
  • the line at which the annotation should be displayed, or 0 if annotation is for a file

@Nonnull public Optional<URI> getLink ()

Callback link. This link is typically a link back to the tool 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 String getMessage ()

Message for the annotation.

Returns
  • message of the annotation

@Nonnull public String getPath ()

Path of the file against which the annotation is created. Note: If annotations were requested for a pull request, then this path will be the path of the file in the pull request, which may be different to the path of the file in the source branch.

Returns
  • file path

@Nonnull public String getReportKey ()

The report key of the report to which this annotation belongs

Returns
  • the report key

@Nonnull public AnnotationSeverity getSeverity ()

The severity of the annotation.

Returns
  • the severity

@Nonnull public Optional<AnnotationType> getType ()

The type of an annotation.

Returns
  • the type

public boolean isOutdated ()

If requested for a pull request, this property indicates that the file to which this annotation was added has also been modified on the target branch of the pull request. If not requested in the context of a pull request, then this value will always be false.

Returns
  • true if the file has been modified on the target branch of the pull request for which this annotation was requested, false otherwise.