Package cdc.issues
Class Issue
- java.lang.Object
-
- cdc.issues.Issue
-
public class Issue extends Object
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 Classes Modifier and Type Class Description static classIssue.Builder<B extends Issue.Builder<B>>Builder ofIssue.
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Issue>TIMESTAMP_COMPARATORComparator of Issues sing timestamp.
-
Constructor Summary
Constructors Modifier Constructor Description protectedIssue(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Issue.Builder<?>builder()booleanequals(Object object)StringgetDescription()StringgetDomain()IssueIdgetId()LocationgetLocationAt(int index)<L extends Location>
LgetLocationAt(int index, Class<L> cls)Location[]getLocations()ParamsgetMetas()StringgetName()<T extends Enum<T>>
TgetName(Class<T> typeClass)intgetNumberOfLocations()ParamsgetParams()StringgetProject()RuleIdgetRuleId()IssueSeveritygetSeverity()StringgetSnapshot()InstantgetTimestamp()inthashCode()StringtoString()
-
-
-
Field Detail
-
TIMESTAMP_COMPARATOR
public static final Comparator<Issue> TIMESTAMP_COMPARATOR
Comparator of Issues sing timestamp.
-
-
Constructor Detail
-
Issue
protected Issue(Issue.Builder<?> builder)
-
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 Detail
-
getTimestamp
public final Instant getTimestamp()
- Returns:
- The Instant at which this issue was created.
-
getId
public IssueId getId()
- Returns:
- The id of this issue.
-
getRuleId
public RuleId getRuleId()
- Returns:
- The RuleId of this issue.
-
getDomain
public String getDomain()
- Returns:
- The domain of the rule of this issue.
-
getName
public String getName()
- Returns:
- The name of the rule of this issue.
-
getParams
public Params getParams()
- Returns:
- The rule parameters of this issue.
-
getProject
public String getProject()
- Returns:
- The project of this issue.
May be
null.
-
getSnapshot
public String getSnapshot()
- Returns:
- The snapshot of this issue.
May be
null.
-
getSeverity
public final IssueSeverity getSeverity()
- Returns:
- The severity of this issue.
-
getDescription
public final String getDescription()
- Returns:
- The description of this issue.
-
getMetas
public Params getMetas()
- Returns:
- The meta data associated to this issue.
-
getLocations
public Location[] getLocations()
- Returns:
- The target locations of this issue.
-
getNumberOfLocations
public final int getNumberOfLocations()
- Returns:
- The number of target locations of this issue.
-
getLocationAt
public Location getLocationAt(int index)
-
builder
public static Issue.Builder<?> builder()
- Returns:
- A new
Issue.BuilderofIssue.
-
-