Enum QualityGateStatus
- java.lang.Object
-
- java.lang.Enum<QualityGateStatus>
-
- io.jenkins.plugins.analysis.core.util.QualityGateStatus
-
- All Implemented Interfaces:
Serializable
,Comparable<QualityGateStatus>
public enum QualityGateStatus extends Enum<QualityGateStatus>
Result of aQualityGateEvaluator.evaluate(IssuesStatistics, FormattedLogger)
call.- Author:
- Ullrich Hafner
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BallColor
getColor()
Deprecated.BallColor is not used anymore, build status icons are now rendered on the UI side onlyString
getDescription()
Returns the localized description be used in the UI.String
getIconClass()
Returns the associatedResult
icon class to be used in the UI.Result
getResult()
Returns the associatedResult
.boolean
isSuccessful()
Returns whether the quality gate has been passed (or has not been activated at all).boolean
isWorseThan(QualityGateStatus other)
Returns whether this status is worse than the specified status.static QualityGateStatus
valueOf(String name)
Returns the enum constant of this type with the specified name.static QualityGateStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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.
-
WARNING
public static final QualityGateStatus WARNING
Quality gate has been missed: severity is a warning.
-
FAILED
public static final QualityGateStatus FAILED
Quality gate has been missed: severity is an error.
-
-
Method Detail
-
values
public static QualityGateStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (QualityGateStatus c : QualityGateStatus.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
getColor
@Deprecated public BallColor getColor()
Deprecated.BallColor is not used anymore, build status icons are now rendered on the UI side onlyReturns the associatedResult
color.- Returns:
- Jenkins'
Result
color
-
getIconClass
public String getIconClass()
Returns the associatedResult
icon class to be used in the UI.- Returns:
- Jenkins'
Result
icon class
-
getDescription
public String getDescription()
Returns the localized description 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
-
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
-
-