Package org.sonar.api.ce.posttask
Interface QualityGate.Condition
-
- Enclosing interface:
- QualityGate
public static interface QualityGate.Condition
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getErrorThreshold()
The threshold value which makes the quality gates status change toQualityGate.EvaluationStatus.ERROR
when it's reached.java.lang.String
getMetricKey()
The key of the metric this condition has been evaluated on.QualityGate.Operator
getOperator()
The operator used to evaluate the error threshold against the value of the measureQualityGate.EvaluationStatus
getStatus()
Evaluation status of this conditionjava.lang.String
getValue()
The value of the measure.java.lang.String
getWarningThreshold()
Deprecated.in 7.6.boolean
isOnLeakPeriod()
Deprecated.in 7.6.
-
-
-
Method Detail
-
getStatus
QualityGate.EvaluationStatus getStatus()
Evaluation status of this condition
-
getMetricKey
java.lang.String getMetricKey()
The key of the metric this condition has been evaluated on.The
Metric
for the returned key can be retrieved using aMetricFinder
instance.- See Also:
MetricFinder.findByKey(String)
-
getOperator
QualityGate.Operator getOperator()
The operator used to evaluate the error threshold against the value of the measure
-
getErrorThreshold
java.lang.String getErrorThreshold()
The threshold value which makes the quality gates status change toQualityGate.EvaluationStatus.ERROR
when it's reached.
-
getWarningThreshold
@Deprecated @CheckForNull java.lang.String getWarningThreshold()
Deprecated.in 7.6. Implementations should always return null.
-
isOnLeakPeriod
@Deprecated boolean isOnLeakPeriod()
Deprecated.in 7.6. Implementations should always return false. Conditions "on leak period" were removed. Use "New X" conditions instead.Whether this condition is defined on the leak period or on an absolute value.
-
getValue
java.lang.String getValue()
The value of the measure.If the type of the metric (which key is provided by
getMetricKey()
) is numerical, the value can be parsed usingInteger.valueOf(String)
,Long.valueOf(String)
orDouble.valueOf(String)
.- Throws:
java.lang.IllegalStateException
- ifgetStatus()
isQualityGate.EvaluationStatus.NO_VALUE
- See Also:
Metric.getType()
-
-