jenkins.plugins.clangscanbuild.actions
Class ClangScanBuildAction

java.lang.Object
  extended by jenkins.plugins.clangscanbuild.actions.ClangScanBuildAction
All Implemented Interfaces:
hudson.model.Action, hudson.model.ModelObject, org.kohsuke.stapler.StaplerProxy

public class ClangScanBuildAction
extends Object
implements hudson.model.Action, org.kohsuke.stapler.StaplerProxy, hudson.model.ModelObject

This contributes the menu to the left used to access reports/whatever from inside a particular job's results. This is called a "BuildAction" because it contributes a link to the left and a URL to a specific build.

Author:
Josh Kennedy

Field Summary
static String BUILD_ACTION_URL_NAME
           
 
Constructor Summary
ClangScanBuildAction(hudson.model.AbstractBuild<?,?> build, int bugCount, boolean markBuildUnstable, int bugThreshold, hudson.FilePath bugSummaryXML)
           
 
Method Summary
 boolean buildFailedDueToExceededThreshold()
           
 void doBrowse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          This method is used to serve up report HTML files from the hidden build folder.
 int getBugCount()
           
 int getBugThreshhold()
           
 String getDisplayName()
          Title of link display on job results screen.
 String getIconFileName()
          Indicates which icon should be displayed next to the link
 Object getTarget()
          This method needs to return the object that is responsible for handling web requests.
 String getUrlName()
          This object will be reference if a request comes into the following url: http://[jenkins]/job/[job name]/[job number]/clangBugReport
 ClangScanBuildBugSummary loadBugSummary()
          The only thing stored in the actual builds in the bugCount and bugThreshold.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILD_ACTION_URL_NAME

public static final String BUILD_ACTION_URL_NAME
See Also:
Constant Field Values
Constructor Detail

ClangScanBuildAction

public ClangScanBuildAction(hudson.model.AbstractBuild<?,?> build,
                            int bugCount,
                            boolean markBuildUnstable,
                            int bugThreshold,
                            hudson.FilePath bugSummaryXML)
Method Detail

buildFailedDueToExceededThreshold

public boolean buildFailedDueToExceededThreshold()

getBugThreshhold

public int getBugThreshhold()

loadBugSummary

public ClangScanBuildBugSummary loadBugSummary()
The only thing stored in the actual builds in the bugCount and bugThreshold. This was done in order to make the build XML smaller to reduce load times. The counts are need in order to render the trend charts. This method actually loads the XML file that was generated at build time and placed alongside the clang output files This XML contains the list of bugs and is used to render the report which links to the clang files. DON'T CALL THIS UNLESS YOU NEED THE ACTUAL BUG SUMMARY


getBugCount

public int getBugCount()

getIconFileName

public String getIconFileName()
Indicates which icon should be displayed next to the link

Specified by:
getIconFileName in interface hudson.model.Action

getDisplayName

public String getDisplayName()
Title of link display on job results screen.

Specified by:
getDisplayName in interface hudson.model.Action
Specified by:
getDisplayName in interface hudson.model.ModelObject

getUrlName

public String getUrlName()
This object will be reference if a request comes into the following url: http://[jenkins]/job/[job name]/[job number]/clangBugReport

Specified by:
getUrlName in interface hudson.model.Action

getTarget

public Object getTarget()
This method needs to return the object that is responsible for handling web requests. This file defines a new url strategy to use which can provide custom urls for this plugin

Specified by:
getTarget in interface org.kohsuke.stapler.StaplerProxy

doBrowse

public void doBrowse(org.kohsuke.stapler.StaplerRequest req,
                     org.kohsuke.stapler.StaplerResponse rsp)
              throws IOException
This method is used to serve up report HTML files from the hidden build folder. It essentially exposes the reports to the web.

Throws:
IOException


Copyright © 2004-2012. All Rights Reserved.