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 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.
-
-
-
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 aorg.sonar.api.measures.MetricFinder
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.
-
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()
-
-