Enum QualityGateStatus

java.lang.Object
java.lang.Enum<QualityGateStatus>
io.jenkins.plugins.util.QualityGateStatus
All Implemented Interfaces:
Serializable, Comparable<QualityGateStatus>

public enum QualityGateStatus extends Enum<QualityGateStatus>
Result of a quality gate evaluation performed by a subclass of QualityGateEvaluator.
Author:
Ullrich Hafner
  • Enum Constant Details

    • INACTIVE

      public static final QualityGateStatus INACTIVE
      Quality gate is inactive, so result evaluation is not available.
    • PASSED

      public static final QualityGateStatus PASSED
      Quality gate has been passed.
    • NOTE

      public static final QualityGateStatus NOTE
      Quality gate has been missed: severity is a note.
    • WARNING

      public static final QualityGateStatus WARNING
      Quality gate has been missed: severity is a warning.
    • ERROR

      public static final QualityGateStatus ERROR
      Quality gate has been missed: severity is an error.
    • FAILED

      public static final QualityGateStatus FAILED
      Quality gate has been missed: severity is a failure.
  • Method Details

    • values

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

      public static QualityGateStatus valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getIconClass

      public String getIconClass()
      Returns the associated Result icon class to be used in the UI.
      Returns:
      Jenkins' Result icon class
    • getDescription

      public String getDescription()
      Returns the localized description to be used in the UI.
      Returns:
      the localized description
    • isSuccessful

      public boolean isSuccessful()
      Returns whether the quality gate has been passed (or has not been activated at all).
      Returns:
      true if the quality gate has been passed, false otherwise
    • getResult

      public Result getResult()
      Returns the associated Result.
      Returns:
      the associated Result
    • isWorseThan

      public boolean isWorseThan(QualityGateStatus other)
      Returns whether this status is worse than the specified status.
      Parameters:
      other - the other status
      Returns:
      true if this status is worse than the other status, false otherwise