Klasse StaticAnalysisLabelProvider

java.lang.Object
io.jenkins.plugins.analysis.core.model.StaticAnalysisLabelProvider
Alle implementierten Schnittstellen:
DescriptionProvider
Bekannte direkte Unterklassen:
IconLabelProvider, SvgIconLabelProvider, SymbolIconLabelProvider

public class StaticAnalysisLabelProvider extends Object implements DescriptionProvider
A generic label provider for static analysis results. Creates pre-defined labels that are parameterized with a string placeholder, that will be replaced with the actual name of the static analysis tool. Moreover, such a default label provider decorates the links and summary boxes with the default icon of the warnings plug-in.
Autor:
Ullrich Hafner
  • Felddetails

    • ANALYSIS_SVG_ICON

      public static final String ANALYSIS_SVG_ICON
      Default icon for all tools.
      Siehe auch:
    • EMPTY_DESCRIPTION

      protected static final DescriptionProvider EMPTY_DESCRIPTION
      Provides an empty description.
  • Konstruktordetails

    • StaticAnalysisLabelProvider

      public StaticAnalysisLabelProvider(String id, @CheckForNull String name)
      Creates a new StaticAnalysisLabelProvider with the specified ID.
      Parameter:
      id - the ID
      name - the name of the static analysis tool
    • StaticAnalysisLabelProvider

      public StaticAnalysisLabelProvider(String id, @CheckForNull String name, DescriptionProvider descriptionProvider)
      Creates a new StaticAnalysisLabelProvider with the specified ID.
      Parameter:
      id - the ID
      name - the name of the static analysis tool
      descriptionProvider - provides additional descriptions for an issue
  • Methodendetails

    • getIssuesModel

      public DetailsTableModel getIssuesModel(Run<?,?> build, String url, edu.hm.hafner.analysis.Report report)
      Returns the model for the issues details table.
      Parameter:
      build - the build of the results
      url - the URL of the results
      report - the report to show
      Gibt zurück:
      the table model
    • getAgeBuilder

      protected StaticAnalysisLabelProvider.DefaultAgeBuilder getAgeBuilder(Run<?,?> owner, String url)
      Creates a StaticAnalysisLabelProvider.DefaultAgeBuilder for the specified run and url.
      Parameter:
      owner - the run to get the age from
      url - the url to the results
      Gibt zurück:
      the age builder
    • getFileNameRenderer

      protected FileNameRenderer getFileNameRenderer(Run<?,?> owner)
      Creates a FileNameRenderer for the specified run.
      Parameter:
      owner - the run to get the file names for
      Gibt zurück:
      the age builder
    • getId

      public String getId()
      Returns the ID of the tool.
      Gibt zurück:
      the ID
    • getName

      public String getName()
      Returns the human-readable name of the tool. If the name has not been set, then the default name is returned.
      Gibt zurück:
      the name
    • setName

      public StaticAnalysisLabelProvider setName(@CheckForNull String name)
      Sets the human-readable name of the tool.
      Parameter:
      name - the name of the tool
      Gibt zurück:
      the name
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • getLinkName

      public String getLinkName()
      Returns the name of the link to the results.
      Gibt zurück:
      the name of the side panel link
    • getRawLinkName

      @Deprecated public String getRawLinkName()
      Veraltet.
      Returns the name of the link to the results.
      Gibt zurück:
      the name of the side panel link
    • getTrendName

      public String getTrendName()
      Returns the legend for the trend chart in the project overview.
      Gibt zurück:
      the legend of the trend chart
    • getSmallIconUrl

      public String getSmallIconUrl()
      Returns the absolute URL to the small icon for the tool.
      Gibt zurück:
      absolute URL
    • getLargeIconUrl

      public String getLargeIconUrl()
      Returns the absolute URL to the large icon for the tool.
      Gibt zurück:
      absolute URL
    • getTitle

      @Deprecated public j2html.tags.ContainerTag getTitle(AnalysisResult result, boolean hasErrors)
      Veraltet.
      rendering of the summary is now done on the client side with the new model SummaryModel
      Returns the title for the small information box in the corresponding build page.
      Parameter:
      result - the result
      hasErrors - indicates if an error has been reported
      Gibt zurück:
      the title div
    • getNewIssuesLabel

      @Deprecated public j2html.tags.ContainerTag getNewIssuesLabel(int newSize)
      Veraltet.
      rendering of the summary is now done on the client side with the new model SummaryModel
      Returns the HTML label for the link to the new issues of the build.
      Parameter:
      newSize - the number of new issues
      Gibt zurück:
      the legend of the trend chart
    • getFixedIssuesLabel

      @Deprecated public j2html.tags.ContainerTag getFixedIssuesLabel(int fixedSize)
      Veraltet.
      rendering of the summary is now done on the client side with the new model SummaryModel
      Returns the HTML label for the link to the fixed issues of the build.
      Parameter:
      fixedSize - the number of fixed issues
      Gibt zurück:
      the legend of the trend chart
    • getNoIssuesSinceLabel

      @Deprecated public j2html.tags.DomContent getNoIssuesSinceLabel(int currentBuild, int noIssuesSinceBuild)
      Veraltet.
      rendering of the summary is now done on the client side with the new model SummaryModel
      Returns the HTML text showing the number of builds since the project has no issues.
      Parameter:
      currentBuild - the current build number
      noIssuesSinceBuild - the build since there are no issues
      Gibt zurück:
      the legend of the trend chart
    • getQualityGateResult

      @Deprecated public j2html.tags.DomContent getQualityGateResult(QualityGateStatus qualityGateStatus)
      Veraltet.
      rendering of the summary is now done on the client side with the new model SummaryModel
      Returns the HTML text showing the result of the quality gate.
      Parameter:
      qualityGateStatus - the status of the quality gate
      Gibt zurück:
      the legend of the trend chart
    • getQualityGateResult

      @Deprecated public j2html.tags.DomContent getQualityGateResult(QualityGateStatus qualityGateStatus, boolean hasResetLink)
      Veraltet.
      rendering of the summary is now done on the client side with the new model SummaryModel
      Returns the HTML text showing the result of the quality gate.
      Parameter:
      qualityGateStatus - the status of the quality gate
      hasResetLink - determines whether the reset reference link is shown
      Gibt zurück:
      the legend of the trend chart
    • getReferenceBuild

      @Deprecated public j2html.tags.DomContent getReferenceBuild(Run<?,?> referenceBuild)
      Veraltet.
      rendering of the summary is now done on the client side with the new model SummaryModel
      Returns the HTML text showing a link to the reference build.
      Parameter:
      referenceBuild - the reference build
      Gibt zurück:
      the legend of the trend chart
    • getToolTip

      public String getToolTip(int numberOfItems)
      Returns a short description describing the total number of issues.
      Parameter:
      numberOfItems - the number of issues to report
      Gibt zurück:
      the description
    • getDescription

      public String getDescription(edu.hm.hafner.analysis.Issue issue)
      Beschreibung aus Schnittstelle kopiert: DescriptionProvider
      Returns a detailed description of the specified issue.
      Angegeben von:
      getDescription in Schnittstelle DescriptionProvider
      Parameter:
      issue - the issue to get the description for
      Gibt zurück:
      the description
    • getSourceCodeDescription

      public String getSourceCodeDescription(Run<?,?> build, edu.hm.hafner.analysis.Issue issue)
      Returns an additional description of the specified issue that will be shown with the source code.
      Parameter:
      build - the current build
      issue - the issue
      Gibt zurück:
      the additional description