hudson.plugins.emma
Class EmmaBuildAction

java.lang.Object
  extended by hudson.plugins.emma.CoverageObject<EmmaBuildAction>
      extended by hudson.plugins.emma.EmmaBuildAction
All Implemented Interfaces:
hudson.model.Action, hudson.model.HealthReportingAction, hudson.model.ModelObject, org.kohsuke.stapler.StaplerProxy

public final class EmmaBuildAction
extends CoverageObject<EmmaBuildAction>
implements hudson.model.HealthReportingAction, org.kohsuke.stapler.StaplerProxy

Build view extension by Emma plugin. As CoverageObject, it retains the overall coverage report.

Author:
Kohsuke Kawaguchi

Field Summary
 hudson.model.AbstractBuild<?,?> owner
           
 
Constructor Summary
EmmaBuildAction(hudson.model.AbstractBuild<?,?> owner, Rule rule, Ratio classCoverage, Ratio methodCoverage, Ratio blockCoverage, Ratio lineCoverage, Ratio conditionCoverage, EmmaHealthReportThresholds thresholds)
           
 
Method Summary
 hudson.model.AbstractBuild<?,?> getBuild()
          Gets the build object that owns the whole coverage report tree.
 hudson.model.HealthReport getBuildHealth()
          Get the coverage HealthReport.
 String getDisplayName()
           
protected static hudson.FilePath[] getEmmaReports(File file)
           
 String getIconFileName()
           
 EmmaBuildAction getPreviousResult()
          Gets the corresponding coverage report object in the previous run that has the record.
 CoverageReport getResult()
          Obtains the detailed CoverageReport instance.
 Object getTarget()
           
 String getUrlName()
           
static EmmaBuildAction load(hudson.model.AbstractBuild<?,?> owner, Rule rule, EmmaHealthReportThresholds thresholds, hudson.FilePath... files)
          Constructs the object from emma XML report files.
static EmmaBuildAction load(hudson.model.AbstractBuild<?,?> owner, Rule rule, EmmaHealthReportThresholds thresholds, InputStream... streams)
           
 
Methods inherited from class hudson.plugins.emma.CoverageObject
doGraph, getApi, getBlockCoverage, getClassCoverage, getConditionCoverage, getLineCoverage, getMethodCoverage, hasClassCoverage, hasConditionCoverage, hasLineCoverage, isFailed, printFourCoverageColumns, printRatioCell, printRatioTable, setFailed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

public final hudson.model.AbstractBuild<?,?> owner
Constructor Detail

EmmaBuildAction

public EmmaBuildAction(hudson.model.AbstractBuild<?,?> owner,
                       Rule rule,
                       Ratio classCoverage,
                       Ratio methodCoverage,
                       Ratio blockCoverage,
                       Ratio lineCoverage,
                       Ratio conditionCoverage,
                       EmmaHealthReportThresholds thresholds)
Method Detail

getDisplayName

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

getIconFileName

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

getUrlName

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

getBuildHealth

public hudson.model.HealthReport getBuildHealth()
Get the coverage HealthReport.

Specified by:
getBuildHealth in interface hudson.model.HealthReportingAction
Returns:
The health report or null if health reporting is disabled.
Since:
1.7

getTarget

public Object getTarget()
Specified by:
getTarget in interface org.kohsuke.stapler.StaplerProxy

getBuild

public hudson.model.AbstractBuild<?,?> getBuild()
Description copied from class: CoverageObject
Gets the build object that owns the whole coverage report tree.

Specified by:
getBuild in class CoverageObject<EmmaBuildAction>

getEmmaReports

protected static hudson.FilePath[] getEmmaReports(File file)
                                           throws IOException,
                                                  InterruptedException
Throws:
IOException
InterruptedException

getResult

public CoverageReport getResult()
Obtains the detailed CoverageReport instance.


getPreviousResult

public EmmaBuildAction getPreviousResult()
Description copied from class: CoverageObject
Gets the corresponding coverage report object in the previous run that has the record.

Specified by:
getPreviousResult in class CoverageObject<EmmaBuildAction>
Returns:
null if no earlier record was found.

load

public static EmmaBuildAction load(hudson.model.AbstractBuild<?,?> owner,
                                   Rule rule,
                                   EmmaHealthReportThresholds thresholds,
                                   hudson.FilePath... files)
                            throws IOException
Constructs the object from emma XML report files. See an example XML file.

Throws:
IOException - if failed to parse the file.

load

public static EmmaBuildAction load(hudson.model.AbstractBuild<?,?> owner,
                                   Rule rule,
                                   EmmaHealthReportThresholds thresholds,
                                   InputStream... streams)
                            throws IOException,
                                   org.xmlpull.v1.XmlPullParserException
Throws:
IOException
org.xmlpull.v1.XmlPullParserException


Copyright © 2004-2012 Hudson. All Rights Reserved.