Class CoverageMetricColumn
- java.lang.Object
-
- hudson.views.ListViewColumn
-
- com.parasoft.findings.jenkins.coverage.api.metrics.steps.CoverageMetricColumn
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ListViewColumn>
public class CoverageMetricColumn extends ListViewColumn
Dashboard column model which represents coverage metrics of different coverage types.- Author:
- Florian Orendi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoverageMetricColumn.CoverageMetricColumnDescriptor
Descriptor of the column.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description CoverageMetricColumn()
Creates a new column.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBackgroundColorFillPercentage(String percentage)
Transforms percentages with a ',' decimal separator to a representation using a '.' in order to use the percentage for styling HTML tags.String
getColumnName()
String
getCoverageText(Job<?,?> job)
Provides a text which represents the coverage percentage of the selected coverage type and metric.Optional<? extends Value>
getCoverageValue(Job<?,?> job)
Provides the coverage value of the selected coverage type and metric.ColorProvider.DisplayColors
getDisplayColors(Job<?,?> job, Optional<? extends Value> coverage)
Provides the line color for representing the passed coverage value.String
getRelativeCoverageUrl(Job<?,?> job)
Provides the relative URL which can be used for accessing the coverage report.-
Methods inherited from class hudson.views.ListViewColumn
all, createDefaultInitialColumnList, createDefaultInitialColumnList, createDefaultInitialColumnList, getColumnCaption, getDescriptor, shownByDefault
-
-
-
-
Method Detail
-
getColumnName
public String getColumnName()
-
getCoverageText
public String getCoverageText(Job<?,?> job)
Provides a text which represents the coverage percentage of the selected coverage type and metric.- Parameters:
job
- the job in the current row- Returns:
- the coverage text
-
getCoverageValue
public Optional<? extends Value> getCoverageValue(Job<?,?> job)
Provides the coverage value of the selected coverage type and metric.- Parameters:
job
- the job in the current row- Returns:
- the coverage percentage
-
getDisplayColors
public ColorProvider.DisplayColors getDisplayColors(Job<?,?> job, Optional<? extends Value> coverage)
Provides the line color for representing the passed coverage value.- Parameters:
job
- the job in the current rowcoverage
- The coverage value as percentage- Returns:
- the line color as hex string
-
getRelativeCoverageUrl
public String getRelativeCoverageUrl(Job<?,?> job)
Provides the relative URL which can be used for accessing the coverage report.- Parameters:
job
- the job in the current row- Returns:
- the relative URL or an empty string when there is no matching URL
-
getBackgroundColorFillPercentage
public String getBackgroundColorFillPercentage(String percentage)
Transforms percentages with a ',' decimal separator to a representation using a '.' in order to use the percentage for styling HTML tags.- Parameters:
percentage
- The text representation of a percentage- Returns:
- the formatted percentage string
-
-