Class AnalysisHistory
java.lang.Object
io.jenkins.plugins.analysis.core.model.AnalysisHistory
- All Implemented Interfaces:
History,Iterable<edu.hm.hafner.echarts.BuildResult<AnalysisBuildResult>>
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.- Author:
- Ullrich Hafner
-
Constructor Summary
ConstructorsConstructorDescriptionAnalysisHistory(Run<?, ?> baseline, ResultSelector selector) Creates a new instance ofAnalysisHistory. -
Method Summary
Modifier and TypeMethodDescriptionReturns the baseline action (if already available).Returns the baseline result (if already available).getBuild()Returns the build that contains the historical result (if there is any).edu.hm.hafner.analysis.ReportReturns the issues of the historical result.Returns the historical result (if there is any).booleanReturns whether this history has more than one result.Iterator<edu.hm.hafner.echarts.BuildResult<AnalysisBuildResult>>iterator()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AnalysisHistory
Creates a new instance ofAnalysisHistory.- Parameters:
baseline- the build to start the history fromselector- selects the associated action from a build
-
-
Method Details
-
getBaselineAction
Description copied from interface:HistoryReturns the baseline action (if already available).- Specified by:
getBaselineActionin interfaceHistory- Returns:
- the baseline action
-
getBaselineResult
Description copied from interface:HistoryReturns the baseline result (if already available).- Specified by:
getBaselineResultin interfaceHistory- Returns:
- the baseline result
-
getResult
Description copied from interface:HistoryReturns the historical result (if there is any). -
getBuild
Description copied from interface:HistoryReturns the build that contains the historical result (if there is any). -
getIssues
public edu.hm.hafner.analysis.Report getIssues()Description copied from interface:HistoryReturns the issues of the historical result. If there is no historical build found, then an empty set of issues is returned. -
hasMultipleResults
public boolean hasMultipleResults()Description copied from interface:HistoryReturns whether this history has more than one result.- Specified by:
hasMultipleResultsin interfaceHistory- Returns:
trueif there are multiple results,falseotherwise
-
toString
-
iterator
- Specified by:
iteratorin interfaceHistory- Specified by:
iteratorin interfaceIterable<edu.hm.hafner.echarts.BuildResult<AnalysisBuildResult>>
-