Package cdc.issues
Class Issue
java.lang.Object
cdc.issues.Issue
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
ConstructorsModifierConstructorDescriptionprotectedIssue(Issue.Builder<?> builder) protectedIssue(String domain, Enum<?> name, Params params, String project, List<? extends Location> locations, String snapshot, IssueSeverity severity, String description, Params metas) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymore.protectedIssue(String domain, String name, Params params, String project, List<? extends Location> locations, String snapshot, IssueSeverity severity, String description, Params metas) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymore.protectedIssue(Instant timestamp, String domain, Enum<?> name, Params params, String project, List<? extends Location> locations, String snapshot, IssueSeverity severity, String description, Params metas) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymore.protectedIssue(Instant timestamp, String domain, String name, Params params, String project, List<? extends Location> locations, String snapshot, IssueSeverity severity, String description, Params metas) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymore. -
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 InstantinthashCode()toString()
-
Field Details
-
TIMESTAMP_COMPARATOR
Comparator of Issues using timestamp.
-
-
Constructor Details
-
Issue
-
Issue
@Deprecated(forRemoval=true, since="2023-10-14") protected Issue(Instant timestamp, String domain, String name, Params params, String project, List<? extends Location> locations, String snapshot, IssueSeverity severity, String description, Params metas) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymore. Issue will be made final.Creates an Issue.- Parameters:
timestamp- The optional timestamp.domain- The rule domain.name- The rule name.params- The rule parameters.project- The project name.locations- The target locations.snapshot- The issue snapshot.severity- The issue severity.description- The issue description.metas- The issue meta data.
-
Issue
@Deprecated(forRemoval=true, since="2023-10-14") protected Issue(String domain, String name, Params params, String project, List<? extends Location> locations, String snapshot, IssueSeverity severity, String description, Params metas) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymore. Issue will be made final.- Parameters:
domain- The rule domain.name- The rule name.params- The rule parameters.project- The project name.locations- The target locations.snapshot- The issue snapshot.severity- The issue severity.description- The issue description.metas- The issue meta data.
-
Issue
@Deprecated(forRemoval=true, since="2023-10-14") protected Issue(Instant timestamp, String domain, Enum<?> name, Params params, String project, List<? extends Location> locations, String snapshot, IssueSeverity severity, String description, Params metas) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymore. Issue will be made final.- Parameters:
timestamp- The optional timestamp.domain- The rule domain.name- The rule name.params- The rule parameters.project- The project name.locations- The target locations.snapshot- The issue snapshot.severity- The issue severity.description- The issue description.metas- The issue meta data.
-
Issue
@Deprecated(forRemoval=true, since="2023-10-14") protected Issue(String domain, Enum<?> name, Params params, String project, List<? extends Location> locations, String snapshot, IssueSeverity severity, String description, Params metas) Deprecated, for removal: This API element is subject to removal in a future version.Do not use anymore. Issue will be made final.- Parameters:
domain- The rule domain.name- The rule name.params- The rule parameters.project- The project name.locations- The target locations.snapshot- The issue snapshot.severity- The issue severity.description- The issue description.metas- The issue meta data.
-
-
Method Details
-
getTimestamp
- Returns:
- The Instant at which this issue was created.
-
getId
- Returns:
- 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
-
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
- Returns:
- The meta data associated to this issue.
-
getLabels
- 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.
-