@ThreadSafe public class RetireJSDataSource extends java.lang.Object implements CachedWebDataSource
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_JS_URL
The default URL to the RetireJS JavaScript repository.
|
static java.lang.String |
RETIREJS_UPDATED_ON
The property key indicating when the last update occurred.
|
| Constructor and Description |
|---|
RetireJSDataSource()
Constructs a new engine version check utility.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
purge(Engine engine)
Deletes any locally cached data.
|
protected boolean |
shouldUpdate(java.io.File repo)
Determines if the we should update the RetireJS database.
|
boolean |
update(Engine engine)
Downloads the current RetireJS data source.
|
public static final java.lang.String RETIREJS_UPDATED_ON
public static final java.lang.String DEFAULT_JS_URL
public RetireJSDataSource()
public boolean update(Engine engine) throws UpdateException
update in interface CachedWebDataSourceengine - a reference to the ODC EngineUpdateException - thrown if the update failedprotected boolean shouldUpdate(java.io.File repo)
throws java.lang.NumberFormatException
repo - the retire JS repository.true if an updated to the RetireJS database should
be performed; otherwise falsejava.lang.NumberFormatException - thrown if an invalid value is contained in
the database propertiespublic boolean purge(Engine engine)
CachedWebDataSourcepurge in interface CachedWebDataSourceengine - a reference to the dependency-check enginetrue if the purge was successful; otherwise
falseCopyright© 2012-21 Jeremy Long. All Rights Reserved.