hudson.plugins.pmd
Class MavenPmdResultAction

java.lang.Object
  extended by hudson.plugins.pmd.util.AbstractResultAction<PmdResult>
      extended by hudson.plugins.pmd.PmdResultAction
          extended by hudson.plugins.pmd.MavenPmdResultAction
All Implemented Interfaces:
hudson.maven.AggregatableAction, hudson.maven.MavenAggregatedReport, hudson.model.Action, hudson.model.HealthReportingAction, hudson.model.ModelObject, ResultAction<PmdResult>, ToolTipProvider, org.kohsuke.stapler.StaplerProxy

public class MavenPmdResultAction
extends PmdResultAction
implements hudson.maven.AggregatableAction, hudson.maven.MavenAggregatedReport

A PmdResultAction for native maven jobs. This action additionally provides result aggregation for sub-modules and for the main project.

Author:
Ulli Hafner

Constructor Summary
MavenPmdResultAction(hudson.model.AbstractBuild<?,?> owner, HealthDescriptor healthDescriptor, java.lang.String height, java.lang.String defaultEncoding)
          Creates a new instance of MavenPmdResultAction.
MavenPmdResultAction(hudson.model.AbstractBuild<?,?> owner, HealthDescriptor healthDescriptor, java.lang.String height, java.lang.String defaultEncoding, PmdResult result)
          Creates a new instance of MavenPmdResultAction.
 
Method Summary
 hudson.maven.MavenAggregatedReport createAggregatedAction(hudson.maven.MavenModuleSetBuild build, java.util.Map<hudson.maven.MavenModule,java.util.List<hudson.maven.MavenBuild>> moduleBuilds)
          
 java.lang.Class<? extends hudson.maven.AggregatableAction> getIndividualActionType()
          
 hudson.model.Action getProjectAction(hudson.maven.MavenModuleSet moduleSet)
          
 void update(java.util.Map<hudson.maven.MavenModule,java.util.List<hudson.maven.MavenBuild>> moduleBuilds, hudson.maven.MavenBuild newBuild)
          Called whenever a new module build is completed, to update the aggregated report.
 
Methods inherited from class hudson.plugins.pmd.PmdResultAction
getDescriptor, getDisplayName, getMultipleItemsTooltip, getPreviousResultAction, getSingleItemTooltip
 
Methods inherited from class hudson.plugins.pmd.util.AbstractResultAction
addModule, buildDataSet, createAggregatedResult, createResult, doGraph, doGraphMap, getBuildHealth, getHealthDescriptor, getHealthReportBuilder, getIconFileName, getOwner, getPreviousBuild, getResult, getTarget, getUrlName, hasPreviousResultAction, setResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
 
Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
 

Constructor Detail

MavenPmdResultAction

public MavenPmdResultAction(hudson.model.AbstractBuild<?,?> owner,
                            HealthDescriptor healthDescriptor,
                            java.lang.String height,
                            java.lang.String defaultEncoding)
Creates a new instance of MavenPmdResultAction.

Parameters:
owner - the associated build of this action
healthDescriptor - health descriptor to use
height - the height of the trend graph
defaultEncoding - the default encoding to be used when reading and parsing files

MavenPmdResultAction

public MavenPmdResultAction(hudson.model.AbstractBuild<?,?> owner,
                            HealthDescriptor healthDescriptor,
                            java.lang.String height,
                            java.lang.String defaultEncoding,
                            PmdResult result)
Creates a new instance of MavenPmdResultAction.

Parameters:
owner - the associated build of this action
healthDescriptor - health descriptor to use
height - the height of the trend graph
defaultEncoding - the default encoding to be used when reading and parsing files
result - the result in this build
Method Detail

createAggregatedAction

public hudson.maven.MavenAggregatedReport createAggregatedAction(hudson.maven.MavenModuleSetBuild build,
                                                                 java.util.Map<hudson.maven.MavenModule,java.util.List<hudson.maven.MavenBuild>> moduleBuilds)

Specified by:
createAggregatedAction in interface hudson.maven.AggregatableAction

getProjectAction

public hudson.model.Action getProjectAction(hudson.maven.MavenModuleSet moduleSet)

Specified by:
getProjectAction in interface hudson.maven.MavenAggregatedReport

getIndividualActionType

public java.lang.Class<? extends hudson.maven.AggregatableAction> getIndividualActionType()

Specified by:
getIndividualActionType in interface hudson.maven.MavenAggregatedReport

update

public void update(java.util.Map<hudson.maven.MavenModule,java.util.List<hudson.maven.MavenBuild>> moduleBuilds,
                   hudson.maven.MavenBuild newBuild)
Called whenever a new module build is completed, to update the aggregated report. When multiple builds complete simultaneously, Hudson serializes the execution of this method, so this method needs not be concurrency-safe.

Specified by:
update in interface hudson.maven.MavenAggregatedReport
Parameters:
moduleBuilds - Same as MavenModuleSet.getModuleBuilds() but provided for convenience and efficiency.
newBuild - Newly completed build.


Copyright © 2009. All Rights Reserved.