Class CoverageBuildAction
java.lang.Object
io.jenkins.plugins.util.BuildAction<Node>
com.parasoft.findings.jenkins.coverage.api.metrics.steps.CoverageBuildAction
- All Implemented Interfaces:
 Action,ModelObject,Serializable,RunAction2,SimpleBuildStep.LastBuildAction,org.kohsuke.stapler.StaplerProxy
public final class CoverageBuildAction
extends io.jenkins.plugins.util.BuildAction<Node>
implements org.kohsuke.stapler.StaplerProxy
Controls the life cycle of the coverage results in a job. This action persists the results of a build and displays a
 summary on the build page. The actual visualization of the results is defined in the matching 
summary.jelly
 file. This action also provides access to the coverage details: these are rendered using a new view instance.- See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionCoverageBuildAction(Run<?, ?> owner, String id, String icon, Node result, io.jenkins.plugins.util.QualityGateResult qualityGateResult, edu.hm.hafner.util.FilteredLog log, ReferenceResult referenceResult) Creates a new instance ofCoverageBuildAction.CoverageBuildAction(Run<?, ?> owner, String id, String icon, Node result, io.jenkins.plugins.util.QualityGateResult qualityGateResult, edu.hm.hafner.util.FilteredLog log, String referenceBuildId, List<? extends Value> modifiedLinesCoverage, ReferenceResult referenceResult) Creates a new instance ofCoverageBuildAction. - 
Method Summary
Modifier and TypeMethodDescriptionprotected CoverageJobActionprotected io.jenkins.plugins.util.AbstractXmlStream<Node>formatValue(Baseline baseline, Metric metric) Returns a formatted and localized String representation of the value for the specified metric (with respect to the given baseline).getAllValues(Baseline baseline) Returns all available values for the specified baseline.protected Stringedu.hm.hafner.util.FilteredLoggetLog()Returns the supported baselines.io.jenkins.plugins.util.QualityGateResultRenders the reference build as HTML-link.Returns the title text for the specified baseline.getValueForMetric(Baseline baseline, Metric metric) Returns the value for the specified metric, if available.Returns all important values for the specified baseline.booleanhasBaselineResult(Baseline baseline) Returns whether a delta metric for the specified metric exists.toString()Methods inherited from class io.jenkins.plugins.util.BuildAction
getBuildActionFromHistoryStartingFrom, getOwner, getProjectActions, getResult, onAttached, onLoad, readResolve 
- 
Constructor Details
- 
CoverageBuildAction
public CoverageBuildAction(Run<?, ?> owner, String id, String icon, Node result, io.jenkins.plugins.util.QualityGateResult qualityGateResult, edu.hm.hafner.util.FilteredLog log, ReferenceResult referenceResult) Creates a new instance ofCoverageBuildAction.- Parameters:
 owner- the associated build that created the statisticsid- ID (URL) of the resultsicon- name of the icon that should be used in actions and viewsresult- the coverage tree as a result to persist with this actionqualityGateResult- status of the quality gateslog- the logging statements of the recording step
 - 
CoverageBuildAction
public CoverageBuildAction(Run<?, ?> owner, String id, String icon, Node result, io.jenkins.plugins.util.QualityGateResult qualityGateResult, edu.hm.hafner.util.FilteredLog log, String referenceBuildId, List<? extends Value> modifiedLinesCoverage, ReferenceResult referenceResult) Creates a new instance ofCoverageBuildAction.- Parameters:
 owner- the associated build that created the statisticsid- ID (URL) of the resultsicon- name of the icon that should be used in actions and viewsresult- the coverage tree as a result to persist with this actionqualityGateResult- status of the quality gateslog- the logging statements of the recording stepreferenceBuildId- the ID of the reference buildmodifiedLinesCoverage- the coverages filtered by modified lines of the associated change request
 
 - 
 - 
Method Details
- 
getLog
public edu.hm.hafner.util.FilteredLog getLog() - 
getQualityGateResult
public io.jenkins.plugins.util.QualityGateResult getQualityGateResult() - 
getFormatter
 - 
getStatistics
 - 
getProjectBaseline
Returns the supported baselines.- Returns:
 - all supported baselines
 
 - 
hasBaselineResult
Returns whether a delta metric for the specified metric exists.- Parameters:
 baseline- the baseline to use- Returns:
 trueif a delta is available for the specified metric,falseotherwise
 - 
getTitle
Returns the title text for the specified baseline.- Parameters:
 baseline- the baseline to get the title for- Returns:
 - the title
 
 - 
getAllValues
Returns all available values for the specified baseline.- Parameters:
 baseline- the baseline to get the values for- Returns:
 - the available values
 - Throws:
 NoSuchElementException- if this baseline does not provide values
 - 
getValues
Returns all important values for the specified baseline.- Parameters:
 baseline- the baseline to get the values for- Returns:
 - the available values
 - Throws:
 NoSuchElementException- if this baseline does not provide values
 - 
getValueForMetric
Returns the value for the specified metric, if available.- Parameters:
 baseline- the baseline to get the value formetric- the metric to get the value for- Returns:
 - the optional value
 
 - 
formatValue
Returns a formatted and localized String representation of the value for the specified metric (with respect to the given baseline).- Parameters:
 baseline- the baseline to usemetric- the metric to get the delta for- Returns:
 - the formatted value
 
 - 
getReferenceBuildLink
Renders the reference build as HTML-link.- Returns:
 - the reference build
 
 - 
getReferenceBuildWarningMessage
 - 
createXmlStream
- Specified by:
 createXmlStreamin classio.jenkins.plugins.util.BuildAction<Node>
 - 
createProjectAction
- Specified by:
 createProjectActionin classio.jenkins.plugins.util.BuildAction<Node>
 - 
getBuildResultBaseName
- Specified by:
 getBuildResultBaseNamein classio.jenkins.plugins.util.BuildAction<Node>
 - 
getTarget
- Specified by:
 getTargetin interfaceorg.kohsuke.stapler.StaplerProxy
 - 
getIconFileName
- Specified by:
 getIconFileNamein interfaceAction
 - 
getDisplayName
- Specified by:
 getDisplayNamein interfaceAction- Specified by:
 getDisplayNamein interfaceModelObject
 - 
getUrlName
- Specified by:
 getUrlNamein interfaceAction
 - 
toString
 
 -