Class RetireJSDataSource
java.lang.Object
org.owasp.dependencycheck.data.update.LocalDataSource
org.owasp.dependencycheck.data.update.RetireJSDataSource
- All Implemented Interfaces:
CachedWebDataSource
Downloads a local copy of the RetireJS repository.
- Author:
- Jeremy Long
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class LocalDataSource
getLastUpdated, saveLastUpdated
-
Field Details
-
RETIREJS_UPDATED_ON
The property key indicating when the last update occurred.- See Also:
-
DEFAULT_JS_URL
The default URL to the RetireJS JavaScript repository.- See Also:
-
-
Constructor Details
-
RetireJSDataSource
public RetireJSDataSource()Constructs a new engine version check utility.
-
-
Method Details
-
update
Downloads the current RetireJS data source.- Parameters:
engine- a reference to the ODC Engine- Returns:
- returns false as no updates are made to the database
- Throws:
UpdateException- thrown if the update failed
-
shouldUpdate
Determines if the we should update the RetireJS database.- Parameters:
repo- the retire JS repository.- Returns:
trueif an updated to the RetireJS database should be performed; otherwisefalse- Throws:
NumberFormatException- thrown if an invalid value is contained in the database properties
-
purge
Description copied from interface:CachedWebDataSourceDeletes any locally cached data.- Parameters:
engine- a reference to the dependency-check engine- Returns:
trueif the purge was successful; otherwisefalse
-