Package cdc.issues
Class Issue
java.lang.Object
cdc.issues.Issue
- All Implemented Interfaces:
LabelsItem,MetasItem
Base class used to describe an Issue (more exactly an occurrence of
detection of an issue).
Node: This class can be specialized if necessary.
An issue may have several target locations.
For example, when there is a compliance issue between several things,
one can not tell which one is at fault.
WARNNING
Issue should probably NOT be derived.
Currently, IO implementations only produce the base Issue class.
There is no support to build any derived class.
If you however do so, it is highly recommended not to add any attribute. If you do that, those attributes won't be retrieved by IO.
- Author:
- Damien Carbonne
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classIssue.Builder<B extends Issue.Builder<B>>Builder ofIssue. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<Issue>Comparator of Issues using timestamp. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Issue.Builder<?>builder()booleanfinal StringgetId()getLocationAt(int index) <L extends Location>
LgetLocationAt(int index, Class<L> cls) Location[]getMetas()getName()<T extends Enum<T>>
Tfinal intfinal IssueSeverityfinal InstantgetTitle()inthashCode()toString()
-
Field Details
-
TIMESTAMP_COMPARATOR
Comparator of Issues using timestamp.
-
-
Constructor Details
-
Issue
-
-
Method Details
-
getTimestamp
- Returns:
- The Instant at which this issue was created.
-
getId
- Returns:
- The id of this issue.
-
getIdHash
- Returns:
- The SHA1 digest of the id of this issue.
-
getRuleId
- Returns:
- The RuleId of this issue.
-
getDomain
- Returns:
- The domain of the rule of this issue.
-
getName
- Returns:
- The name of the rule of this issue.
-
getName
-
getTitle
- Returns:
- The title of the rule of this issue.
-
getParams
- Returns:
- The rule parameters of this issue.
-
getProject
- Returns:
- The project of this issue.
May be
null.
-
getSnapshot
- Returns:
- The snapshot of this issue.
May be
null.
-
getSeverity
- Returns:
- The severity of this issue.
-
getDescription
- Returns:
- The description of this issue.
-
getMetas
-
getLabels
- Specified by:
getLabelsin interfaceLabelsItem- Returns:
- The labels associated to this issue.
-
getLocations
- Returns:
- The target locations of this issue.
-
getNumberOfLocations
public final int getNumberOfLocations()- Returns:
- The number of target locations of this issue.
-
getLocationAt
-
getLocationAt
-
hashCode
public int hashCode() -
equals
-
toString
-
builder
- Returns:
- A new
Issue.BuilderofIssue.
-