net.praqma.jenkins.plugin.prqa.notifier
Class PRQABuildAction

java.lang.Object
  extended by net.praqma.jenkins.plugin.prqa.notifier.PRQABuildAction
All Implemented Interfaces:
hudson.model.Action, hudson.model.ModelObject

public class PRQABuildAction
extends Object
implements hudson.model.Action

Author:
Praqma

Field Summary
static String DISPLAY_NAME
           
static String URL_NAME
           
 
Constructor Summary
PRQABuildAction()
           
PRQABuildAction(hudson.model.AbstractBuild<?,?> build)
           
 
Method Summary
 void doReportGraphs(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          This function works in the following way: After choosing your report type, as set of supported graphs are given, which it is up to the user to add.
 net.praqma.prqa.PRQAReading getBuildActionStatus()
           
<T extends net.praqma.prqa.status.PRQAStatus>
T
getBuildActionStatus(Class<T> clazz)
           
 net.praqma.prqa.status.StatusCategory[] getComplianceCategories()
           
 String getDisplayName()
           
 String getIconFileName()
           
 PRQABuildAction getPreviousAction()
          Used to cycle through all previous builds.
 PRQABuildAction getPreviousAction(hudson.model.AbstractBuild<?,?> base)
          Fetches the previous PRQA build.
 hudson.tasks.Publisher getPublisher()
           
<T extends hudson.tasks.Publisher>
T
getPublisher(Class<T> clazz)
           
 net.praqma.prqa.PRQAReading getResult()
           
<T extends net.praqma.prqa.status.PRQAStatus>
T
getResult(Class<T> clazz)
          Converts the result of the interface to a concrete implementation.
 Number getThreshold(net.praqma.prqa.status.StatusCategory cat)
           
 String getUrlName()
           
 void setPublisher(hudson.tasks.Publisher publisher)
           
 void setResult(net.praqma.prqa.PRQAReading result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISPLAY_NAME

public static final String DISPLAY_NAME
See Also:
Constant Field Values

URL_NAME

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

PRQABuildAction

public PRQABuildAction()

PRQABuildAction

public PRQABuildAction(hudson.model.AbstractBuild<?,?> build)
Method Detail

getIconFileName

public String getIconFileName()
Specified by:
getIconFileName in interface hudson.model.Action

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface hudson.model.Action
Specified by:
getDisplayName in interface hudson.model.ModelObject

getUrlName

public String getUrlName()
Specified by:
getUrlName in interface hudson.model.Action

getPublisher

public hudson.tasks.Publisher getPublisher()
Returns:
the publisher

getPublisher

public <T extends hudson.tasks.Publisher> T getPublisher(Class<T> clazz)

getResult

public net.praqma.prqa.PRQAReading getResult()

getThreshold

public Number getThreshold(net.praqma.prqa.status.StatusCategory cat)

getResult

public <T extends net.praqma.prqa.status.PRQAStatus> T getResult(Class<T> clazz)
Converts the result of the interface to a concrete implementation. Returns null in cases where it is not possible. This check is needed if you for some reason decide to switch report type on the same job, since each report has it's own implementation of a status. We need to do a check on all the collecte results to get those that fits the current job profile.

Type Parameters:
T -
Parameters:
clazz -
Returns:

setResult

public void setResult(net.praqma.prqa.PRQAReading result)

setPublisher

public void setPublisher(hudson.tasks.Publisher publisher)
Parameters:
publisher - the publisher to set

getPreviousAction

public PRQABuildAction getPreviousAction()
Used to cycle through all previous builds.

Returns:

getPreviousAction

public PRQABuildAction getPreviousAction(hudson.model.AbstractBuild<?,?> base)
Fetches the previous PRQA build. Skips builds that were not configured as a PRQA Build. Goes to the end of list.


getBuildActionStatus

public net.praqma.prqa.PRQAReading getBuildActionStatus()

getBuildActionStatus

public <T extends net.praqma.prqa.status.PRQAStatus> T getBuildActionStatus(Class<T> clazz)

getComplianceCategories

public net.praqma.prqa.status.StatusCategory[] getComplianceCategories()

doReportGraphs

public void doReportGraphs(org.kohsuke.stapler.StaplerRequest req,
                           org.kohsuke.stapler.StaplerResponse rsp)
                    throws IOException
This function works in the following way: After choosing your report type, as set of supported graphs are given, which it is up to the user to add. Currently this is done programatically, but given my design, it should be relatively simple to make this possible to edit in the GUI. If a result is fetched and it does not contain the property to draw the graphs the report demands we simply skip it. This means you can switch report type in a job. You don't need to create a new job if you just want to change reporting mode. This method catches the PrqaReadingException, when that exception is thrown it means that the we skip the reading and continue.

Parameters:
req -
rsp -
Throws:
IOException


Copyright © 2004-2013. All Rights Reserved.