Class HostedSuppressionsDataSource
- java.lang.Object
-
- org.owasp.dependencycheck.data.update.LocalDataSource
-
- org.owasp.dependencycheck.data.update.HostedSuppressionsDataSource
-
- All Implemented Interfaces:
CachedWebDataSource
public class HostedSuppressionsDataSource extends LocalDataSource
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_SUPPRESSIONS_URLThe default URL to the Hosted Suppressions file.
-
Constructor Summary
Constructors Constructor Description HostedSuppressionsDataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanpurge(Engine engine)Deletes any locally cached data.protected booleanshouldUpdate(java.io.File repo)Determines if the we should update the Hosted Suppressions file.booleanupdate(Engine engine)Downloads the current Hosted suppressions file.-
Methods inherited from class org.owasp.dependencycheck.data.update.LocalDataSource
getLastUpdated, saveLastUpdated
-
-
-
-
Field Detail
-
DEFAULT_SUPPRESSIONS_URL
public static final java.lang.String DEFAULT_SUPPRESSIONS_URL
The default URL to the Hosted Suppressions file.- See Also:
- Constant Field Values
-
-
Method Detail
-
update
public boolean update(Engine engine) throws UpdateException
Downloads the current Hosted suppressions file.- Parameters:
engine- a reference to the ODC Engine- Returns:
- returns false as no updates are made to the database, just web resources cached locally
- Throws:
UpdateException- thrown if the update encountered fatal errors
-
shouldUpdate
protected boolean shouldUpdate(java.io.File repo) throws java.lang.NumberFormatExceptionDetermines if the we should update the Hosted Suppressions file.- Parameters:
repo- the Hosted Suppressions file.- Returns:
trueif an update to the Hosted Suppressions file should be performed; otherwisefalse- Throws:
java.lang.NumberFormatException- thrown if an invalid value is contained in the database properties
-
purge
public boolean purge(Engine engine)
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
-
-