Package com.codedx.util
Class CodeDxVersion
- java.lang.Object
-
- com.codedx.util.CodeDxVersion
-
- All Implemented Interfaces:
Comparable<CodeDxVersion>
public final class CodeDxVersion extends Object implements Comparable<CodeDxVersion>
Represents a Code Dx version number, disregarding tail matter like "RC" and "SNAPSHOT". The constructor is private; use the staticfromString
method instead. Instances are available for reference to point out min/max versions supporting certain features that might necessitate the Jenkins plugin to behave differently.
-
-
Field Summary
Fields Modifier and Type Field Description static CodeDxVersion
MIN_FOR_ANALYSIS_NAMES
First version that supports the "analysis names" feature.static CodeDxVersion
MIN_FOR_BRANCHING
static CodeDxVersion
MIN_FOR_POLICIES
static CodeDxVersion
NEW_STATUS_REMOVED
Version when the "New" triage status was removed in Code Dx (2.4.0).static CodeDxVersion
NEW_STATUS_RETURNED
Version when the "New" triage status was returned to Code Dx (2.4.2).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(CodeDxVersion that)
boolean
equals(Object thatObj)
static CodeDxVersion
fromString(String version)
int
hashCode()
boolean
supportsTriageNew()
Convenience method that determines if this version of Code Dx supports the "New" triage status.String
toString()
-
-
-
Field Detail
-
NEW_STATUS_REMOVED
public static final CodeDxVersion NEW_STATUS_REMOVED
Version when the "New" triage status was removed in Code Dx (2.4.0). At this time, filters intending to use the "New" status would instead use the "First Seen" filter, using some threshold date to categorize "new" findings.
-
NEW_STATUS_RETURNED
public static final CodeDxVersion NEW_STATUS_RETURNED
Version when the "New" triage status was returned to Code Dx (2.4.2). Several clients were adversely affected by the removal, and requested its return. Versions before (exclusive) this version, and starting from (inclusive) theNEW_STATUS_REMOVED
version must use the "First Seen" filter in order to emulate the behavior of the "triage status = New" filter.
-
MIN_FOR_ANALYSIS_NAMES
public static final CodeDxVersion MIN_FOR_ANALYSIS_NAMES
First version that supports the "analysis names" feature.
-
MIN_FOR_BRANCHING
public static final CodeDxVersion MIN_FOR_BRANCHING
-
MIN_FOR_POLICIES
public static final CodeDxVersion MIN_FOR_POLICIES
-
-
Method Detail
-
fromString
public static CodeDxVersion fromString(String version)
-
compareTo
public int compareTo(CodeDxVersion that)
- Specified by:
compareTo
in interfaceComparable<CodeDxVersion>
-
supportsTriageNew
public boolean supportsTriageNew()
Convenience method that determines if this version of Code Dx supports the "New" triage status. Logically, this method checks thatthis < NEW_STATUS_REMOVED || this >= NEW_STATUS_RETURNED
- Returns:
- Whether the "NEW" triage status is supported
-
-