Class LocalDataSource

java.lang.Object
org.owasp.dependencycheck.data.update.LocalDataSource
All Implemented Interfaces:
CachedWebDataSource
Direct Known Subclasses:
HostedSuppressionsDataSource, RetireJSDataSource

public abstract class LocalDataSource extends Object implements CachedWebDataSource
Author:
Jeremy Long
  • Constructor Details

    • LocalDataSource

      public LocalDataSource()
  • Method Details

    • saveLastUpdated

      protected void saveLastUpdated(File repo, long timestamp)
      Saves the timestamp in a properties file next to the provided repo file
      Parameters:
      repo - the local file data source
      timestamp - the epoch timestamp to store
    • getLastUpdated

      protected long getLastUpdated(File repo)
      Retrieves the last updated date from the local file system (in a file next to the repo file).
      Parameters:
      repo - the local file data source
      Returns:
      the epoch timestamp of the last updated date/time