Class CodeSonarHubAnalysisDataLoader
java.lang.Object
org.jenkinsci.plugins.codesonar.services.CodeSonarHubAnalysisDataLoader
Loads and caches data related to a single analysis, for use by "Condition" classes.
This class implements two distinct modes for loading data: a "legacy" mode, and the current mode.
The legacy mode loads large lists of warnings and procedures into main memory.
This was the only mode implemented through plugin version 3.3.x.
The current mode fetches analysis data in a more memory-safe way, but it requires CodeSonar hub JSON APIs,
available only in CodeSonar 7.3 and later (i.e. with the "gridConfigJson" capability).
- Author:
- aseno
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCodeSonarHubAnalysisDataLoader
(HttpService httpService, CodeSonarHubInfo hubInfo, URI baseHubUri, Long analysisId, String visibilityFilter, String newWarningsVisibilityFilter) -
Method Summary
Modifier and TypeMethodDescriptionprotected Long
protected Analysis
protected Analysis
protected Metrics
protected Procedures
protected String
long
int
long
long
getNumberOfWarningsWithScoreAboveThreshold
(int threshold) protected String
-
Field Details
-
services
-
hubInfo
-
-
Constructor Details
-
CodeSonarHubAnalysisDataLoader
public CodeSonarHubAnalysisDataLoader(HttpService httpService, CodeSonarHubInfo hubInfo, URI baseHubUri, Long analysisId, String visibilityFilter, String newWarningsVisibilityFilter)
-
-
Method Details
-
getBaseHubUri
-
getAnalysisId
-
getVisibilityFilter
-
getNewWarningsVisibilityFilter
-
getLegacyAnalysisViewActive
- Throws:
CodeSonarPluginException
-
getLegacyAnalysisViewNew
- Throws:
CodeSonarPluginException
-
getLegacyProcedures
- Throws:
CodeSonarPluginException
-
getLegacyMetrics
- Throws:
CodeSonarPluginException
-
getNumberOfActiveWarnings
- Throws:
CodeSonarPluginException
-
getNumberOfNewWarnings
- Throws:
CodeSonarPluginException
-
getProcedureWithMaxCyclomaticComplexity
- Throws:
CodeSonarPluginException
-
getNumberOfAlerts
- Throws:
CodeSonarPluginException
-
getNumberOfWarningsWithScoreAboveThreshold
public long getNumberOfWarningsWithScoreAboveThreshold(int threshold) throws CodeSonarPluginException - Throws:
CodeSonarPluginException
-