hudson.plugins.codecover
Class CodeCoverBuildAction

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

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

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

Author:
Kohsuke Kawaguchi

Field Summary
 hudson.model.AbstractBuild<?,?> owner
           
 
Constructor Summary
CodeCoverBuildAction(hudson.model.AbstractBuild<?,?> owner, Rule rule, Ratio statementCoverage, Ratio branchCoverage, Ratio loopCoverage, Ratio conditionCoverage, CodeCoverHealthReportThresholds 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.
protected static File getCodeCoverReport(File file)
           
 String getDisplayName()
           
 String getIconFileName()
           
 CodeCoverBuildAction 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 CodeCoverBuildAction load(hudson.model.AbstractBuild<?,?> owner, Rule rule, CodeCoverHealthReportThresholds thresholds, hudson.FilePath... files)
          Constructs the object from codecover XML report files.
static CodeCoverBuildAction load(hudson.model.AbstractBuild<?,?> owner, Rule rule, CodeCoverHealthReportThresholds thresholds, InputStream... streams)
           
 
Methods inherited from class hudson.plugins.codecover.CoverageObject
doGraph, getApi, getBranchCoverage, getConditionCoverage, getLoopCoverage, getStatementCoverage, hasConditionCoverage, hasStatementCoverage, 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

CodeCoverBuildAction

public CodeCoverBuildAction(hudson.model.AbstractBuild<?,?> owner,
                            Rule rule,
                            Ratio statementCoverage,
                            Ratio branchCoverage,
                            Ratio loopCoverage,
                            Ratio conditionCoverage,
                            CodeCoverHealthReportThresholds 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<CodeCoverBuildAction>

getCodeCoverReport

protected static File getCodeCoverReport(File file)
                                  throws IOException,
                                         InterruptedException
Throws:
IOException
InterruptedException

getResult

public CoverageReport getResult()
Obtains the detailed CoverageReport instance.


getPreviousResult

public CodeCoverBuildAction 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<CodeCoverBuildAction>
Returns:
null if no earlier record was found.

load

public static CodeCoverBuildAction load(hudson.model.AbstractBuild<?,?> owner,
                                        Rule rule,
                                        CodeCoverHealthReportThresholds thresholds,
                                        hudson.FilePath... files)
                                 throws IOException
Constructs the object from codecover XML report files.

Throws:
IOException - if failed to parse the file.

load

public static CodeCoverBuildAction load(hudson.model.AbstractBuild<?,?> owner,
                                        Rule rule,
                                        CodeCoverHealthReportThresholds thresholds,
                                        InputStream... streams)
                                 throws IOException
Throws:
IOException


Copyright © 2004-2011. All Rights Reserved.