java.lang.Object
io.jenkins.plugins.coverage.model.visualization.dashboard.CoverageColumnType
Bekannte direkte Unterklassen:
ChangeCoverage, ChangeCoverageDelta, IndirectCoverageChanges, ProjectCoverage, ProjectCoverageDelta

public abstract class CoverageColumnType extends Object
Provides functions for different types of coverage that can be represented within a CoverageColumn.
Autor:
Florian Orendi
  • Konstruktordetails

    • CoverageColumnType

      public CoverageColumnType(org.jvnet.localizer.Localizable displayName)
      Constructor.
      Parameter:
      displayName - The name of the coverage type
  • Methodendetails

    • getColorProvider

      protected ColorProvider getColorProvider()
      Provides a color provider which is used to determine fill and line colors.
      Gibt zurück:
      the color provider
    • getCoverage

      public abstract Optional<CoveragePercentage> getCoverage(CoverageBuildAction action, CoverageMetric metric)
      Gets the coverage of the passed metric from the passed action.
      Parameter:
      action - The action which contains the coverage
      metric - The coverage metric
      Gibt zurück:
      the coverage as optional or an empty optional if no coverage has been found
    • getDisplayColors

      public abstract ColorProvider.DisplayColors getDisplayColors(CoveragePercentage coverage)
      Gets the display colors which are used for visualizing the passed coverage.
      Parameter:
      coverage - The coverage percentage
      Gibt zurück:
      the display colors
    • formatCoverage

      public abstract String formatCoverage(CoveragePercentage coverage, Locale locale)
      Formats the passed coverage using the passed Locale.
      Parameter:
      coverage - The coverage to be formatted
      locale - The locale
      Gibt zurück:
      the formatted coverage string
    • getAnchor

      public String getAnchor()
      Returns the anchor which stands for a specific part of the coverage report which belongs to this coverage column. The default value is '#overview'.
      Gibt zurück:
      the anchor
    • getAvailableCoverageTypeNames

      public static List<String> getAvailableCoverageTypeNames()
      Gets the names of the available coverage types.
      Gibt zurück:
      the display names
    • getDisplayName

      public String getDisplayName()