hudson.plugins.analysis.core
Class BuildResultEvaluator

java.lang.Object
  extended by hudson.plugins.analysis.core.BuildResultEvaluator

public class BuildResultEvaluator
extends Object

Checks if the number of annotations exceeds a given threshold value.

Author:
Ulli Hafner

Constructor Summary
BuildResultEvaluator(String url)
          Creates a new instance of BuildResultEvaluator.
 
Method Summary
 hudson.model.Result evaluateBuildResult(PluginLogger logger, Thresholds t, Collection<? extends FileAnnotation> allAnnotations)
          Deprecated. use evaluateBuildResult(StringBuilder, Thresholds, Collection)
 hudson.model.Result evaluateBuildResult(PluginLogger logger, Thresholds t, Collection<? extends FileAnnotation> allAnnotations, Collection<FileAnnotation> newAnnotations)
          Deprecated. use evaluateBuildResult(StringBuilder, Thresholds, Collection, Collection)
 hudson.model.Result evaluateBuildResult(PluginLogger logger, Thresholds t, Collection<? extends FileAnnotation> allAnnotations, int delta, int highDelta, int normalDelta, int lowDelta)
          Deprecated. use evaluateBuildResult(StringBuilder, Thresholds, Collection, int, int, int, int)
 hudson.model.Result evaluateBuildResult(StringBuilder logger, Thresholds t, Collection<? extends FileAnnotation> allAnnotations)
          Evaluates the build result.
 hudson.model.Result evaluateBuildResult(StringBuilder logger, Thresholds t, Collection<? extends FileAnnotation> allAnnotations, Collection<FileAnnotation> newAnnotations)
          Evaluates the build result.
 hudson.model.Result evaluateBuildResult(StringBuilder logger, Thresholds t, Collection<? extends FileAnnotation> allAnnotations, int delta, int highDelta, int normalDelta, int lowDelta)
          Evaluates the build result.
 boolean isAnnotationCountExceeded(int annotationCount, String annotationThreshold)
          Returns whether the new annotation count exceeds the user defined threshold and the build should be set to unstable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildResultEvaluator

public BuildResultEvaluator(String url)
Creates a new instance of BuildResultEvaluator.

Parameters:
url - the url of the build results
Method Detail

evaluateBuildResult

public hudson.model.Result evaluateBuildResult(StringBuilder logger,
                                               Thresholds t,
                                               Collection<? extends FileAnnotation> allAnnotations)
Evaluates the build result. The build is marked as unstable or failed if one of the thresholds has been exceeded.

Parameters:
logger - logs the results
t - the thresholds
allAnnotations - all annotations
Returns:
the build result

evaluateBuildResult

public hudson.model.Result evaluateBuildResult(StringBuilder logger,
                                               Thresholds t,
                                               Collection<? extends FileAnnotation> allAnnotations,
                                               int delta,
                                               int highDelta,
                                               int normalDelta,
                                               int lowDelta)
Evaluates the build result. The build is marked as unstable or failed if one of the thresholds has been exceeded.

Parameters:
logger - logs the results
t - the thresholds
delta - delta between this build and reference build
highDelta - delta between this build and reference build (priority high)
normalDelta - delta between this build and reference build (priority normal)
lowDelta - delta between this build and reference build (priority low)
allAnnotations - all annotations
Returns:
the build result

evaluateBuildResult

public hudson.model.Result evaluateBuildResult(StringBuilder logger,
                                               Thresholds t,
                                               Collection<? extends FileAnnotation> allAnnotations,
                                               Collection<FileAnnotation> newAnnotations)
Evaluates the build result. The build is marked as unstable or failed if one of the thresholds has been exceeded.

Parameters:
logger - logs the results
t - the thresholds
allAnnotations - all annotations
newAnnotations - the new annotations
Returns:
the build result

isAnnotationCountExceeded

public boolean isAnnotationCountExceeded(int annotationCount,
                                         String annotationThreshold)
Returns whether the new annotation count exceeds the user defined threshold and the build should be set to unstable.

Parameters:
annotationCount - the number of new annotations
annotationThreshold - string representation of the threshold value
Returns:
true if the build should be set to unstable

evaluateBuildResult

@Deprecated
public hudson.model.Result evaluateBuildResult(PluginLogger logger,
                                                          Thresholds t,
                                                          Collection<? extends FileAnnotation> allAnnotations)
Deprecated. use evaluateBuildResult(StringBuilder, Thresholds, Collection)

Evaluates the build result. The build is marked as unstable or failed if one of the thresholds has been exceeded.

Parameters:
logger - logs the results
t - the thresholds
allAnnotations - all annotations
Returns:
the build result

evaluateBuildResult

@Deprecated
public hudson.model.Result evaluateBuildResult(PluginLogger logger,
                                                          Thresholds t,
                                                          Collection<? extends FileAnnotation> allAnnotations,
                                                          int delta,
                                                          int highDelta,
                                                          int normalDelta,
                                                          int lowDelta)
Deprecated. use evaluateBuildResult(StringBuilder, Thresholds, Collection, int, int, int, int)

Evaluates the build result. The build is marked as unstable or failed if one of the thresholds has been exceeded.

Parameters:
logger - logs the results
t - the thresholds
delta - delta between this build and reference build
highDelta - delta between this build and reference build (priority high)
normalDelta - delta between this build and reference build (priority normal)
lowDelta - delta between this build and reference build (priority low)
allAnnotations - all annotations
Returns:
the build result

evaluateBuildResult

@Deprecated
public hudson.model.Result evaluateBuildResult(PluginLogger logger,
                                                          Thresholds t,
                                                          Collection<? extends FileAnnotation> allAnnotations,
                                                          Collection<FileAnnotation> newAnnotations)
Deprecated. use evaluateBuildResult(StringBuilder, Thresholds, Collection, Collection)

Evaluates the build result. The build is marked as unstable or failed if one of the thresholds has been exceeded.

Parameters:
logger - logs the results
t - the thresholds
allAnnotations - all annotations
newAnnotations - the new annotations
Returns:
the build result


Copyright © 2004-2012 Hudson. All Rights Reserved.