|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.pmd.util.HealthReportBuilder
public class HealthReportBuilder
Creates a health report for integer values based on healthy and unhealthy thresholds.
HealthReport,
Serialized Form| Constructor Summary | |
|---|---|
HealthReportBuilder()
Creates a new dummy instance of HealthReportBuilder. |
|
HealthReportBuilder(boolean isFailureThresholdEnabled,
int threshold,
boolean isHealthyReportEnabled,
int healthy,
int unHealthy,
java.lang.String reportSingleCount,
java.lang.String reportMultipleCount)
Creates a new instance of HealthReportBuilder. |
|
| Method Summary | |
|---|---|
hudson.model.HealthReport |
computeHealth(int counter)
Computes the healthiness of a build based on the specified counter. |
org.jfree.chart.JFreeChart |
createGraph(boolean useHealthBuilder,
java.lang.String url,
org.jfree.data.category.CategoryDataset dataset,
ToolTipProvider toolTipProvider)
Creates a trend graph for the corresponding action using the thresholds of this health builder. |
java.util.List<java.lang.Integer> |
createSeries(int totalCount)
Creates a list of integer values used to create a three color graph showing the items per build. |
int |
getHealthy()
Returns the healthy. |
java.lang.String |
getItemName()
Returns the itemName. |
java.lang.String |
getReportName()
Returns the reportName. |
int |
getThreshold()
Returns the threshold. |
int |
getUnHealthy()
Returns the unHealthy. |
boolean |
isEnabled()
Returns whether this health report build is enabled, i.e. |
boolean |
isFailureThresholdEnabled()
Returns the isThresholdEnabled. |
boolean |
isHealthyReportEnabled()
Returns the isHealthyReportEnabled. |
void |
setFailureThresholdEnabled(boolean isFailureThresholdEnabled)
Sets the isThresholdEnabled to the specified value. |
void |
setHealthy(int healthy)
Sets the healthy to the specified value. |
void |
setHealthyReportEnabled(boolean isHealthyReportEnabled)
Sets the isHealthyReportEnabled to the specified value. |
void |
setItemName(java.lang.String itemName)
Sets the itemName to the specified value. |
void |
setReportName(java.lang.String reportName)
Sets the reportName to the specified value. |
void |
setThreshold(int threshold)
Sets the threshold to the specified value. |
void |
setUnHealthy(int unHealthy)
Sets the unHealthy to the specified value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HealthReportBuilder(boolean isFailureThresholdEnabled,
int threshold,
boolean isHealthyReportEnabled,
int healthy,
int unHealthy,
java.lang.String reportSingleCount,
java.lang.String reportMultipleCount)
HealthReportBuilder.
isFailureThresholdEnabled - determines whether to use the provided unstable thresholdthreshold - bug threshold to be reached if a build should be considered as
unstable.isHealthyReportEnabled - determines whether to use the provided healthy thresholds.healthy - report health as 100% when the number of warnings is less than
this valueunHealthy - report health as 0% when the number of warnings is greater
than this valuereportSingleCount - message to be shown if there is exactly one item foundreportMultipleCount - message to be shown if there are zero or more than one items
foundpublic HealthReportBuilder()
HealthReportBuilder.
| Method Detail |
|---|
public hudson.model.HealthReport computeHealth(int counter)
healthy. Reports a health of 0% when the specified counter is
greater than unHealthy.
counter - the number of items in a build
public boolean isEnabled()
true if health or failed thresholds are providedpublic final int getHealthy()
public final void setHealthy(int healthy)
healthy - the value to setpublic final int getUnHealthy()
public final void setUnHealthy(int unHealthy)
unHealthy - the value to setpublic final boolean isHealthyReportEnabled()
public final void setHealthyReportEnabled(boolean isHealthyReportEnabled)
isHealthyReportEnabled - the value to setpublic boolean isFailureThresholdEnabled()
public void setFailureThresholdEnabled(boolean isFailureThresholdEnabled)
isFailureThresholdEnabled - the value to setpublic final java.lang.String getReportName()
public final void setReportName(java.lang.String reportName)
reportName - the value to setpublic final java.lang.String getItemName()
public final void setItemName(java.lang.String itemName)
itemName - the value to setpublic int getThreshold()
public void setThreshold(int threshold)
threshold - the value to setpublic java.util.List<java.lang.Integer> createSeries(int totalCount)
totalCount - total number of items
public org.jfree.chart.JFreeChart createGraph(boolean useHealthBuilder,
java.lang.String url,
org.jfree.data.category.CategoryDataset dataset,
ToolTipProvider toolTipProvider)
useHealthBuilder - if the health thresholds should be used at allurl - the URL shown in the tool tipsdataset - the data set of the values to rendertoolTipProvider - tooltip provider for the clickable map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||