hudson.plugins.analysis.core
Class AnnotationsAggregator

java.lang.Object
  extended by hudson.matrix.MatrixAggregator
      extended by hudson.plugins.analysis.core.AnnotationsAggregator
All Implemented Interfaces:
hudson.ExtensionPoint

public abstract class AnnotationsAggregator
extends hudson.matrix.MatrixAggregator

Aggregates ResultActions of MatrixRuns into MatrixBuild.

Author:
Ulli Hafner

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.matrix.MatrixAggregator
build, launcher, listener
 
Constructor Summary
AnnotationsAggregator(hudson.matrix.MatrixBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener, HealthDescriptor healthDescriptor, String defaultEncoding)
          Creates a new instance of AnnotationsAggregator.
 
Method Summary
protected abstract  hudson.model.Action createAction(HealthDescriptor healthDescriptor, String defaultEncoding, ParserResult aggregatedResult)
          Creates the action that will render the aggregated results.
 boolean endBuild()
           
 boolean endRun(hudson.matrix.MatrixRun run)
           
protected abstract  BuildResult getResult(hudson.matrix.MatrixRun run)
          Returns the annotations of the specified run.
protected  boolean hasResult(hudson.matrix.MatrixRun run)
          Returns whether the specified run has a result to aggregate.
 
Methods inherited from class hudson.matrix.MatrixAggregator
startBuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationsAggregator

public AnnotationsAggregator(hudson.matrix.MatrixBuild build,
                             hudson.Launcher launcher,
                             hudson.model.BuildListener listener,
                             HealthDescriptor healthDescriptor,
                             String defaultEncoding)
Creates a new instance of AnnotationsAggregator.

Parameters:
build - the matrix build
launcher - the launcher
listener - the build listener
healthDescriptor - health descriptor
defaultEncoding - the default encoding to be used when reading and parsing files
Method Detail

endRun

public boolean endRun(hudson.matrix.MatrixRun run)
               throws InterruptedException,
                      IOException
Overrides:
endRun in class hudson.matrix.MatrixAggregator
Throws:
InterruptedException
IOException

endBuild

public boolean endBuild()
                 throws InterruptedException,
                        IOException
Overrides:
endBuild in class hudson.matrix.MatrixAggregator
Throws:
InterruptedException
IOException

hasResult

protected boolean hasResult(hudson.matrix.MatrixRun run)
Returns whether the specified run has a result to aggregate.

Parameters:
run - the run to obtain the annotations from
Returns:
true if there is a result to aggregate, false otherwise
Since:
1.19

getResult

@Nonnull
protected abstract BuildResult getResult(hudson.matrix.MatrixRun run)
Returns the annotations of the specified run.

Parameters:
run - the run to obtain the annotations from
Returns:
the annotations of the specified run
See Also:
if there is no valid result available

createAction

protected abstract hudson.model.Action createAction(HealthDescriptor healthDescriptor,
                                                    String defaultEncoding,
                                                    ParserResult aggregatedResult)
Creates the action that will render the aggregated results.

Parameters:
healthDescriptor - health descriptor
defaultEncoding - the default encoding to be used when reading and parsing files
aggregatedResult - the aggregated annotations
Returns:
the created action


Copyright © 2004-2012 Hudson. All Rights Reserved.