hudson.plugins.findbugs
Class FindBugsResultAction

java.lang.Object
  extended by hudson.plugins.findbugs.util.AbstractResultAction<FindBugsResult>
      extended by hudson.plugins.findbugs.FindBugsResultAction
All Implemented Interfaces:
hudson.model.Action, hudson.model.HealthReportingAction, hudson.model.ModelObject, ResultAction<FindBugsResult>, java.io.Serializable, org.kohsuke.stapler.StaplerProxy

public class FindBugsResultAction
extends AbstractResultAction<FindBugsResult>

Controls the live cycle of the FindBugs results. This action persists the results of the FindBugs analysis of a build and displays the results on the build page. The actual visualization of the results is defined in the matching summary.jelly file.

Moreover, this class renders the FindBugs result trend.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
FindBugsResultAction(hudson.model.AbstractBuild<?,?> owner, FindBugsResult result, HealthReportBuilder healthReportBuilder)
          Creates a new instance of FindBugsBuildAction.
 
Method Summary
protected  org.jfree.chart.JFreeChart createChart(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Creates the chart for this action.
 java.lang.String getDisplayName()
          
protected  int getHealthCounter()
          Returns the health counter of this result.
 java.lang.String getIconUrl()
          Returns the file name URL of the icon.
 FindBugsResultAction getPreviousResultAction()
          Gets the FindBugs result of the previous build.
 java.lang.String getUrlName()
          
 boolean hasPreviousResultAction()
          Returns whether a previous build already has a result action of this type attached.
 
Methods inherited from class hudson.plugins.findbugs.util.AbstractResultAction
doGraph, doGraphMap, getBuildHealth, getHealthReportBuilder, getIconFileName, getOwner, getResult, getTarget, setResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindBugsResultAction

public FindBugsResultAction(hudson.model.AbstractBuild<?,?> owner,
                            FindBugsResult result,
                            HealthReportBuilder healthReportBuilder)
Creates a new instance of FindBugsBuildAction.

Parameters:
owner - the associated build of this action
result - the result in this build
healthReportBuilder - health builder to use
Method Detail

getHealthCounter

protected int getHealthCounter()
Returns the health counter of this result.

Specified by:
getHealthCounter in class AbstractResultAction<FindBugsResult>
Returns:
the health counter of this result.

getDisplayName

public java.lang.String getDisplayName()


getIconUrl

public java.lang.String getIconUrl()
Returns the file name URL of the icon.

Specified by:
getIconUrl in class AbstractResultAction<FindBugsResult>
Returns:
the file name URL of the icon.

getUrlName

public java.lang.String getUrlName()


getPreviousResultAction

public FindBugsResultAction getPreviousResultAction()
Gets the FindBugs result of the previous build.

Returns:
the FindBugs result of the previous build.
Throws:
java.util.NoSuchElementException - if there is no previous build for this action

hasPreviousResultAction

public boolean hasPreviousResultAction()
Returns whether a previous build already has a result action of this type attached.

Returns:
true a previous build already has a result action of this type attached

createChart

protected org.jfree.chart.JFreeChart createChart(org.kohsuke.stapler.StaplerRequest request,
                                                 org.kohsuke.stapler.StaplerResponse response)
Creates the chart for this action.

Specified by:
createChart in class AbstractResultAction<FindBugsResult>
Parameters:
request - Stapler request
response - Stapler response
Returns:
the chart for this action.


Copyright © 2008. All Rights Reserved.