@ThreadSafe public class NvdCveUpdater extends java.lang.Object implements CachedWebDataSource
Constructor and Description |
---|
NvdCveUpdater() |
Modifier and Type | Method and Description |
---|---|
protected MetaProperties |
getMetaFile(java.lang.String url)
Downloads the NVD CVE Meta file properties.
|
protected java.util.List<NvdCveInfo> |
getUpdatesNeeded()
Determines if the index needs to be updated.
|
protected void |
initializeExecutorServices()
Initialize the executor services for download and processing of the NVD
CVE XML data.
|
boolean |
purge(Engine engine)
Deletes any locally cached data.
|
protected void |
setSettings(Settings settings)
Sets the settings object; this is used during testing.
|
boolean |
update(Engine engine)
Downloads the latest NVD CVE XML file from the web and imports it into
the current CVE Database.
|
public boolean update(Engine engine) throws UpdateException
update
in interface CachedWebDataSource
engine
- a reference to the dependency-check engineUpdateException
- is thrown if there is an error updating the
databaseprotected void initializeExecutorServices()
protected final MetaProperties getMetaFile(java.lang.String url) throws UpdateException
url
- the URL to the NVD CVE JSON fileUpdateException
- thrown if the meta file could not be downloadedprotected final java.util.List<NvdCveInfo> getUpdatesNeeded() throws UpdateException
UpdateException
- Is thrown if there is an issue with the last
updated properties fileprotected void setSettings(Settings settings)
settings
- the configured settingspublic boolean purge(Engine engine)
CachedWebDataSource
purge
in interface CachedWebDataSource
engine
- a reference to the dependency-check enginetrue
if the purge was successful; otherwise
false
Copyright© 2012-21 Jeremy Long. All Rights Reserved.