Interface InsightAnnotation
public interface InsightAnnotation
- Since:
- 5.15
-
Method Summary
Modifier and TypeMethodDescriptionIf present, represents the id in the external system.Path of the file against which the annotation is created.int
getLine()
Line at which the annotation would be displayed.getLink()
Callback link.Message for the annotation.The report key of the report to which this annotation belongsThe severity of the annotation.getType()
The type of an annotation.
-
Method Details
-
getExternalId
If present, represents the id in the external system.- Returns:
- the id, or empty if no value was supplied
-
getFilePath
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:
- the file path, or
empty
if the annotation isn't associated with a specific file. - Since:
- 6.9
-
getLine
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
-
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, orOptional.empty()
if no link was stored
-
getMessage
Message for the annotation.- Returns:
- message of the annotation
-
getReportKey
The report key of the report to which this annotation belongs- Returns:
- the report key
-
getSeverity
The severity of the annotation.- Returns:
- the severity
-
getType
The type of an annotation.- Returns:
- the type
-