hudson.plugins.testabilityexplorer.report
Class AbstractBuildReport<T extends hudson.model.AbstractBuild<?,?>>

java.lang.Object
  extended by hudson.plugins.testabilityexplorer.helpers.AbstractBuildAction<T>
      extended by hudson.plugins.testabilityexplorer.report.AbstractBuildReport<T>
All Implemented Interfaces:
hudson.model.Action, hudson.model.HealthReportingAction, hudson.model.ModelObject
Direct Known Subclasses:
BuildAggregatedReport, BuildIndividualReport

public abstract class AbstractBuildReport<T extends hudson.model.AbstractBuild<?,?>>
extends AbstractBuildAction<T>

Abstract AbstractBuildAction class that is capable of rendering different build reports.

Author:
reik.schatz

Constructor Summary
AbstractBuildReport(java.util.Collection<Statistic> results, ReportBuilder reportBuilder, CostDetailBuilder detailBuilder)
           
 
Method Summary
 void doTrendGraph(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, int height)
          Renders a jfree chart graph into the given StaplerResponse.
 hudson.model.HealthReport getBuildHealth()
          
 java.lang.String getDisplayName()
           
 java.lang.Object getDynamic(java.lang.String link, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          This will be called implicitly by Stapler framework, if there is a dynamic part in the regular link.
Example: lets say your plugin is called testability.
 java.lang.String getGraphName()
          Title that will be displayed above the graph.
 java.lang.String getIconFileName()
           
 java.util.Collection<Statistic> getResults()
           
 java.lang.String getSummary()
          Controls the summary text to display beside the build report icon on the build summary page.
 int getTotals()
           
 java.lang.String getUrlName()
           
 
Methods inherited from class hudson.plugins.testabilityexplorer.helpers.AbstractBuildAction
getBuild, isFloatingBoxActive, isGraphActive, setBuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBuildReport

public AbstractBuildReport(java.util.Collection<Statistic> results,
                           ReportBuilder reportBuilder,
                           CostDetailBuilder detailBuilder)
Method Detail

getResults

public java.util.Collection<Statistic> getResults()

getSummary

public java.lang.String getSummary()
Controls the summary text to display beside the build report icon on the build summary page.

Overrides:
getSummary in class AbstractBuildAction<T extends hudson.model.AbstractBuild<?,?>>
Returns:
String

getTotals

public int getTotals()

getDynamic

public java.lang.Object getDynamic(java.lang.String link,
                                   org.kohsuke.stapler.StaplerRequest request,
                                   org.kohsuke.stapler.StaplerResponse response)
This will be called implicitly by Stapler framework, if there is a dynamic part in the regular link.
Example: lets say your plugin is called testability. When requesting http://hudson:8080/job/project/build/testability/foo this method gets called with foo as first parameter.

Parameters:
link - the dynamic part of the url after the plugin name
request - StaplerRequest
response - StaplerResponse
Returns:
any object that you want to work with in .jelly files

getBuildHealth

public hudson.model.HealthReport getBuildHealth()


doTrendGraph

public final void doTrendGraph(org.kohsuke.stapler.StaplerRequest request,
                               org.kohsuke.stapler.StaplerResponse response,
                               int height)
                        throws java.io.IOException
Renders a jfree chart graph into the given StaplerResponse. If the given StaplerRequest contains a paramter classes set to true, a classes trend graph instead of the overall trend graph will be rendered.

Parameters:
request - a StaplerRequest
response - a StaplerResponse
height - the height of the charts (not used for now)
Throws:
java.io.IOException - if there is a problem writing to the StaplerResponse

getGraphName

public java.lang.String getGraphName()
Description copied from class: AbstractBuildAction
Title that will be displayed above the graph.

Overrides:
getGraphName in class AbstractBuildAction<T extends hudson.model.AbstractBuild<?,?>>
Returns:
String

getIconFileName

public java.lang.String getIconFileName()

getDisplayName

public java.lang.String getDisplayName()

getUrlName

public java.lang.String getUrlName()


Copyright © 2009. All Rights Reserved.