Class HealthReport
- All Implemented Interfaces:
Serializable,Comparable<HealthReport>
- Since:
- 1.115
- Author:
- connollys
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFix deserialization of older data. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new HealthReport.HealthReport(int score, String description) Deprecated.since 2008-10-18.HealthReport(int score, String iconUrl, String description) Deprecated.since 2008-10-18.HealthReport(int score, String iconUrl, org.jvnet.localizer.Localizable description) Create a new HealthReport.HealthReport(int score, org.jvnet.localizer.Localizable description) Create a new HealthReport. -
Method Summary
Modifier and TypeMethodDescriptionintGetter for property 'aggregatedReports'.Getter for property 'description'.Get health status icon class.Getter for property 'iconUrl'.getIconUrl(String size) Get's the iconUrl relative to the hudson root url, for the correct size.org.jvnet.localizer.LocalizableGetter for property 'localizibleDescription'.intgetScore()Getter for property 'score'.booleanGetter for property 'aggregateReport'.static HealthReportmax(HealthReport a, HealthReport b) Utility method to find the report with the highest health.static HealthReportmin(HealthReport a, HealthReport b) Utility method to find the report with the lowest health.voidsetDescription(String description) Setter for property 'description'.voidsetIconUrl(String iconUrl) Setter for property 'iconUrl'.voidsetLocalizibleDescription(org.jvnet.localizer.Localizable localizibleDescription) Setter for property 'localizibleDescription'.voidsetScore(int score) Setter for property 'score'.
-
Constructor Details
-
HealthReport
Deprecated.since 2008-10-18. UseHealthReport(int, String, org.jvnet.localizer.Localizable)Create a new HealthReport.- Parameters:
score- The percentage health score (from 0 to 100 inclusive).iconUrl- The path to the icon corresponding to thisAction's health ornullto display the default icon corresponding to the current health score.If the path begins with a '/' then it will be the absolute path, otherwise the image is assumed to be in one of
/images/16x16/,/images/24x24/or/images/32x32/depending on the icon size selected by the user. When calculating the url to display for absolute paths, the getIconUrl(String) method will replace /32x32/ in the path with the appropriate size.description- The health icon's tool-tip.
-
HealthReport
Create a new HealthReport.- Parameters:
score- The percentage health score (from 0 to 100 inclusive).iconUrl- The path to the icon corresponding to thisAction's health ornullto display the default icon corresponding to the current health score.If the path begins with a '/' then it will be the absolute path, otherwise the image is assumed to be in one of
/images/16x16/,/images/24x24/or/images/32x32/depending on the icon size selected by the user. When calculating the url to display for absolute paths, the getIconUrl(String) method will replace /32x32/ in the path with the appropriate size.description- The health icon's tool-tip.
-
HealthReport
Deprecated.since 2008-10-18. UseHealthReport(int, org.jvnet.localizer.Localizable)Create a new HealthReport.- Parameters:
score- The percentage health score (from 0 to 100 inclusive).description- The health icon's tool-tip.
-
HealthReport
public HealthReport(int score, org.jvnet.localizer.Localizable description) Create a new HealthReport.- Parameters:
score- The percentage health score (from 0 to 100 inclusive).description- The health icon's tool-tip.
-
HealthReport
public HealthReport()Create a new HealthReport.
-
-
Method Details
-
getScore
@Exported public int getScore()Getter for property 'score'.- Returns:
- The percentage health score (from 0 to 100 inclusive).
-
setScore
public void setScore(int score) Setter for property 'score'.- Parameters:
score- Value to set for property 'score'.
-
getIconUrl
Getter for property 'iconUrl'.- Returns:
- Value for property 'iconUrl'.
-
getIconClassName
Get health status icon class.- Returns:
- The health status icon class.
-
getIconUrl
Get's the iconUrl relative to the hudson root url, for the correct size.- Parameters:
size- The size, e.g. 32x32, 24x24 or 16x16.- Returns:
- The url relative to hudson's root url.
-
setIconUrl
Setter for property 'iconUrl'.- Parameters:
iconUrl- Value to set for property 'iconUrl'.
-
getDescription
Getter for property 'description'.- Returns:
- Value for property 'description'.
-
setDescription
Setter for property 'description'.- Parameters:
description- Value to set for property 'description'.
-
getLocalizableDescription
public org.jvnet.localizer.Localizable getLocalizableDescription()Getter for property 'localizibleDescription'.- Returns:
- Value for property 'localizibleDescription'.
-
setLocalizibleDescription
public void setLocalizibleDescription(org.jvnet.localizer.Localizable localizibleDescription) Setter for property 'localizibleDescription'.- Parameters:
localizibleDescription- Value to set for property 'localizibleDescription'.
-
getAggregatedReports
Getter for property 'aggregatedReports'.- Returns:
- Value for property 'aggregatedReports'.
-
isAggregateReport
public boolean isAggregateReport()Getter for property 'aggregateReport'.- Returns:
- Value for property 'aggregateReport'.
-
compareTo
- Specified by:
compareToin interfaceComparable<HealthReport>
-
min
Utility method to find the report with the lowest health. -
max
Utility method to find the report with the highest health.
-