Class HealthDescriptor
java.lang.Object
io.jenkins.plugins.analysis.core.util.HealthDescriptor
- All Implemented Interfaces:
Serializable
A health descriptor defines the parameters to create the build health.
- Author:
- Ullrich Hafner
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHealthDescriptor(int healthy, int unhealthy, edu.hm.hafner.analysis.Severity minimumSeverity) Creates a newHealthDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the healthy threshold, i.e., when health is reported as 100%.edu.hm.hafner.analysis.SeverityReturns the minimum severity that should be considered when computing the build health.intReturns the unhealthy threshold, i.e., when health is reported as 0%.booleanDetermines whether health reporting is enabled.booleanisValid()Determines whether health reporting is enabled.toString()
-
Constructor Details
-
HealthDescriptor
public HealthDescriptor(int healthy, int unhealthy, edu.hm.hafner.analysis.Severity minimumSeverity) Creates a newHealthDescriptor.- Parameters:
healthy- the healthy threshold, i.e., when health is reported as 100%.unhealthy- the unhealthy threshold, i.e., when health is reported as 0%.minimumSeverity- the minimum severity that should be considered when computing the build health
-
-
Method Details
-
getHealthy
public int getHealthy()Returns the healthy threshold, i.e., when health is reported as 100%.- Returns:
- the 100% healthiness
-
getUnhealthy
public int getUnhealthy()Returns the unhealthy threshold, i.e., when health is reported as 0%.- Returns:
- the 0% unhealthiness
-
getMinimumSeverity
public edu.hm.hafner.analysis.Severity getMinimumSeverity()Returns the minimum severity that should be considered when computing the build health. E.g., ifSeverity.WARNING_NORMALis returned, then annotations with severitySeverity.WARNING_LOWare ignored.- Returns:
- the minimum severity to consider
-
isEnabled
public boolean isEnabled()Determines whether health reporting is enabled.- Returns:
trueif health reporting is enabled,falseotherwise
-
isValid
public boolean isValid()Determines whether health reporting is enabled.- Returns:
trueif health reporting is enabled,falseotherwise
-
toString
-