Class SummaryModel

java.lang.Object
io.jenkins.plugins.analysis.core.model.SummaryModel

public class SummaryModel extends Object
Summary message of a static analysis run. This message is shown as part of the 'summary.jelly' information of the associated ResultAction.
     Tool Name: %d issues from %d analyses
        - Results from analyses {%s, ... %s}
        - %d new issues (since build %d)
        - %d outstanding issues
        - %d fixed issues
        - No issues since build %d
        - Quality gates: passed (Reference build %d)
 
Author:
Ullrich Hafner
  • Constructor Details

    • SummaryModel

      public SummaryModel(StaticAnalysisLabelProvider labelProvider, AnalysisResult result)
      Creates a new SummaryModel.
      Parameters:
      labelProvider - the label provider to get the labels for the static analysis tool
      result - the result of the static analysis tool
  • Method Details

    • getId

      public String getId()
    • getName

      public String getName()
    • getTitle

      public String getTitle()
      Returns the title for the small information box in the corresponding build page.
      Returns:
      the title
    • getAnalysesCount

      public int getAnalysesCount()
      Returns the number of analysis files that have been parsed in this step.
      Returns:
      the number of analysis files
    • getErrors

      public org.eclipse.collections.api.list.ImmutableList<String> getErrors()
    • getTotalSize

      public int getTotalSize()
    • getNewSize

      public int getNewSize()
    • getFixedSize

      public int getFixedSize()
    • getModifiedSize

      public int getModifiedSize()
    • getModifiedNewSize

      public int getModifiedNewSize()
    • getModifiedOutstandingSize

      public int getModifiedOutstandingSize()
    • getTools

      public List<StaticAnalysisLabelProvider> getTools()
      Returns the tools that contribute to this result.
      Returns:
      the tools that have been used in this report
    • totalSize

      public int totalSize(String origin)
      Returns the number of issues for a specific tool given by its origin value.
      Parameters:
      origin - the ID of the tool
      Returns:
      the number of issues for this tool
    • getQualityGateStatus

      public io.jenkins.plugins.util.QualityGateStatus getQualityGateStatus()
    • isResetQualityGateVisible

      public boolean isResetQualityGateVisible()
    • getReferenceBuild

      public Optional<Run<?,?>> getReferenceBuild()
    • getReferenceBuildLink

      public String getReferenceBuildLink()
      Renders the reference build as an HTML link.
      Returns:
      the reference build
      See Also:
    • isZeroIssuesHighscore

      public boolean isZeroIssuesHighscore()
    • getNoIssuesSinceBuild

      public int getNoIssuesSinceBuild()
    • getZeroIssuesHighscoreMessage

      public String getZeroIssuesHighscoreMessage()