@ThreadSafe public class NexusAnalyzer extends AbstractFileTypeAnalyzer
Settings.KEYS.ANALYZER_NEXUS_ENABLED
determines whether this analyzer is even enabled. This can be overridden by
setting the system property.Settings.KEYS.ANALYZER_NEXUS_URL
the URL to a Nexus service to search by SHA-1. There is an expected
%s in this where the SHA-1 will get entered.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_URL
The default URL - this will be used by the CentralAnalyzer to determine
whether to enable this.
|
| Constructor and Description |
|---|
NexusAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
void |
analyzeDependency(Dependency dependency,
Engine engine)
Performs the analysis.
|
AnalysisPhase |
getAnalysisPhase()
Returns the analysis phase under which the analyzer runs.
|
protected java.lang.String |
getAnalyzerEnabledSettingKey()
Returns the key used in the properties file to reference the analyzer's
enabled property.
|
protected java.io.FileFilter |
getFileFilter()
Returns the FileFilter
|
java.lang.String |
getName()
Returns the analyzer's name.
|
void |
initialize(Settings settings)
Initializes the analyzer with the configured settings.
|
boolean |
isEnabled()
Determine whether to enable this analyzer or not.
|
void |
prepareFileTypeAnalyzer(Engine engine)
Initializes the analyzer once before any analysis is performed.
|
boolean |
useProxy()
Determine if a proxy should be used for the Nexus Analyzer.
|
accept, getFilesMatched, newHashSet, prepareAnalyzer, setFilesMatchedanalyze, close, closeAnalyzer, getSettings, prepare, setEnabled, supportsParallelProcessingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitanalyze, close, prepare, supportsParallelProcessingpublic static final java.lang.String DEFAULT_URL
public void initialize(Settings settings)
initialize in interface Analyzerinitialize in class AbstractAnalyzersettings - the configured settings to usepublic boolean isEnabled()
isEnabled in interface AnalyzerisEnabled in class AbstractAnalyzerpublic void prepareFileTypeAnalyzer(Engine engine) throws InitializationException
prepareFileTypeAnalyzer in class AbstractFileTypeAnalyzerengine - a reference to the dependency-check engineInitializationException - if there's an error during initializationpublic java.lang.String getName()
protected java.lang.String getAnalyzerEnabledSettingKey()
getAnalyzerEnabledSettingKey in class AbstractAnalyzerpublic AnalysisPhase getAnalysisPhase()
protected java.io.FileFilter getFileFilter()
getFileFilter in class AbstractFileTypeAnalyzerpublic void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException
analyzeDependency in class AbstractAnalyzerdependency - the dependency to analyzeengine - the engineAnalysisException - when there's an exception during analysispublic boolean useProxy()
true if a proxy should be usedCopyright© 2012-21 Jeremy Long. All Rights Reserved.