Klasse AnalysisHistory

java.lang.Object
io.jenkins.plugins.analysis.core.model.AnalysisHistory
Alle implementierten Schnittstellen:
History, Iterable<edu.hm.hafner.echarts.BuildResult<AnalysisBuildResult>>

public class AnalysisHistory extends Object implements History
Provides a history of static analysis results. The history starts from a baseline build and provides access to a historical build result of the same type (or to all historical results using the provided interator implementation). The results are filtered by a ResultSelector, so a history returns only results of the same type. This history can be configured to ignore the builds that did not pass the quality gate (see QualityGateEvaluationMode). Note that the baseline run might still be in progress and thus has not yet a result attached: i.e., the result of the getPrevious* methods may return different results on subsequent calls.
Autor:
Ullrich Hafner
  • Konstruktordetails

    • AnalysisHistory

      public AnalysisHistory(Run<?,?> baseline, ResultSelector selector)
      Creates a new instance of AnalysisHistory.
      Parameter:
      baseline - the build to start the history from
      selector - selects the associated action from a build
  • Methodendetails

    • getBaselineAction

      public Optional<ResultAction> getBaselineAction()
      Beschreibung aus Schnittstelle kopiert: History
      Returns the baseline action (if already available).
      Angegeben von:
      getBaselineAction in Schnittstelle History
      Gibt zurück:
      the baseline action
    • getBaselineResult

      public Optional<AnalysisResult> getBaselineResult()
      Beschreibung aus Schnittstelle kopiert: History
      Returns the baseline result (if already available).
      Angegeben von:
      getBaselineResult in Schnittstelle History
      Gibt zurück:
      the baseline result
    • getResult

      public Optional<AnalysisResult> getResult()
      Beschreibung aus Schnittstelle kopiert: History
      Returns the historical result (if there is any).
      Angegeben von:
      getResult in Schnittstelle History
      Gibt zurück:
      the historical result
    • getBuild

      public Optional<Run<?,?>> getBuild()
      Beschreibung aus Schnittstelle kopiert: History
      Returns the build that contains the historical result (if there is any).
      Angegeben von:
      getBuild in Schnittstelle History
      Gibt zurück:
      the historical result
    • getIssues

      public edu.hm.hafner.analysis.Report getIssues()
      Beschreibung aus Schnittstelle kopiert: History
      Returns the issues of the historical result. If there is no historical build found, then an empty set of issues is returned.
      Angegeben von:
      getIssues in Schnittstelle History
      Gibt zurück:
      the issues of the historical build
    • hasMultipleResults

      public boolean hasMultipleResults()
      Beschreibung aus Schnittstelle kopiert: History
      Returns whether this history has more than one result.
      Angegeben von:
      hasMultipleResults in Schnittstelle History
      Gibt zurück:
      true if there are multiple results, false otherwise
    • toString

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

      @NonNull public Iterator<edu.hm.hafner.echarts.BuildResult<AnalysisBuildResult>> iterator()
      Angegeben von:
      iterator in Schnittstelle History
      Angegeben von:
      iterator in Schnittstelle Iterable<edu.hm.hafner.echarts.BuildResult<AnalysisBuildResult>>