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.StringgetErrorThreshold()The threshold value which makes the quality gates status change toQualityGate.EvaluationStatus.ERRORwhen it's reached.java.lang.StringgetMetricKey()The key of the metric this condition has been evaluated on.QualityGate.OperatorgetOperator()The operator used to evaluate the error threshold against the value of the measureQualityGate.EvaluationStatusgetStatus()Evaluation status of this conditionjava.lang.StringgetValue()The value of the measure.java.lang.StringgetWarningThreshold()Deprecated.in 7.6.booleanisOnLeakPeriod()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
Metricfor the returned key can be retrieved using aMetricFinderinstance.- 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.ERRORwhen 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()
-
-