Enum Class SeverityLevel

java.lang.Object
java.lang.Enum<SeverityLevel>
com.vaadin.appsec.backend.model.dto.SeverityLevel
All Implemented Interfaces:
Serializable, Comparable<SeverityLevel>, Constable

public enum SeverityLevel extends Enum<SeverityLevel> implements Serializable
Severity level for a vulnerability. Contains the appropriate CVSS score ranges what can be used to get the severity based on the score.
See Also:
  • Enum Constant Details

    • CRITICAL

      public static final SeverityLevel CRITICAL
      Critical severity level.
    • HIGH

      public static final SeverityLevel HIGH
      High severity level.
    • MEDIUM

      public static final SeverityLevel MEDIUM
      Medium severity level.
    • LOW

      public static final SeverityLevel LOW
      Low severity level.
    • NONE

      public static final SeverityLevel NONE
      None severity level.
  • Method Details

    • values

      public static SeverityLevel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SeverityLevel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getMinScore

      public Double getMinScore()
    • getMaxScore

      public Double getMaxScore()
    • getCaption

      public String getCaption()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<SeverityLevel>
    • getSeverityLevelForCvssScore

      public static SeverityLevel getSeverityLevelForCvssScore(Double cvssScore)
      Returns the severity level based on the CVSS score. The score should be between 0.0 and 10.0 numbers.
      Parameters:
      cvssScore - the CVSS score
      Returns:
      the severity level