hudson.plugins.tasks.util
Class BuildResultEvaluator

java.lang.Object
  extended by hudson.plugins.tasks.util.BuildResultEvaluator

public class BuildResultEvaluator
extends java.lang.Object

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

Author:
Ulli Hafner

Constructor Summary
BuildResultEvaluator()
           
 
Method Summary
 hudson.model.Result evaluateBuildResult(PluginLogger logger, HealthDescriptor descriptor, java.util.Collection<FileAnnotation> allAnnotations, java.util.Collection<FileAnnotation> newAnnotations)
          Evaluates the build result.
 boolean isAnnotationCountExceeded(int annotationCount, java.lang.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()
Method Detail

evaluateBuildResult

public hudson.model.Result evaluateBuildResult(PluginLogger logger,
                                               HealthDescriptor descriptor,
                                               java.util.Collection<FileAnnotation> allAnnotations,
                                               java.util.Collection<FileAnnotation> newAnnotations)
Evaluates the build result. The build is marked as unstable if one of the thresholds has been exceeded.

Parameters:
logger - logs the results
descriptor - health descriptor
allAnnotations - all annotations
newAnnotations - new annotations
Returns:
the build result

isAnnotationCountExceeded

public boolean isAnnotationCountExceeded(int annotationCount,
                                         java.lang.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


Copyright © 2009. All Rights Reserved.