java.lang.Object
hudson.views.ListViewColumn
io.jenkins.plugins.coverage.model.visualization.dashboard.CoverageColumn
Alle implementierten Schnittstellen:
ExtensionPoint, Describable<ListViewColumn>

public class CoverageColumn extends ListViewColumn
Dashboard column model which represents coverage metrics of different coverage types.
Autor:
Florian Orendi
  • Konstruktordetails

    • CoverageColumn

      @DataBoundConstructor public CoverageColumn()
      Empty constructor.
  • Methodendetails

    • getColumnName

      public String getColumnName()
    • setColumnName

      @DataBoundSetter public void setColumnName(String columnName)
      Sets the display name of the column.
      Parameter:
      columnName - The name of the column
    • getCoverageMetric

      public String getCoverageMetric()
    • setCoverageType

      @DataBoundSetter public void setCoverageType(String coverageType)
      Defines which coverage type should be shown in the column.
      Parameter:
      coverageType - The type to be shown
    • getCoverageType

      public String getCoverageType()
    • setCoverageMetric

      @DataBoundSetter public void setCoverageMetric(String coverageMetric)
      Defines which coverage metric should be shown in the column.
      Parameter:
      coverageMetric - The coverage metric to be shown
    • getCoverageText

      public String getCoverageText(Job<?,?> job)
      Provides a text which represents the coverage percentage of the selected coverage type and metric.
      Parameter:
      job - The processed job
      Gibt zurück:
      the coverage text
    • getCoverageValue

      public Optional<CoveragePercentage> getCoverageValue(Job<?,?> job)
      Provides the coverage value of the selected coverage type and metric.
      Parameter:
      job - The processed job
      Gibt zurück:
      the coverage percentage
    • getDisplayColors

      public ColorProvider.DisplayColors getDisplayColors(Job<?,?> job, Optional<CoveragePercentage> coverage)
      Provides the line color for representing the passed coverage value.
      Parameter:
      job - The processed job
      coverage - The coverage value as percentage
      Gibt zurück:
      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.
      Parameter:
      job - The processed job
      Gibt zurück:
      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.
      Parameter:
      percentage - The text representation of a percentage
      Gibt zurück:
      the formatted percentage string
    • getSelectedCoverageColumnType

      public CoverageColumnType getSelectedCoverageColumnType()