Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.owasp.dependencycheck.data.update
Class StandardUpdateTask

    java.lang.Object
      org.owasp.dependencycheck.data.update.AbstractUpdateTask
          org.owasp.dependencycheck.data.update.StandardUpdateTask

All Implemented Interfaces:
  UpdateTask

    public class StandardUpdateTask

extends AbstractUpdateTask

Class responsible for updating the CPE and NVDCVE data stores.

Author:
  Jeremy Long (jeremy.long@owasp.org)

Constructor Summary
`StandardUpdateTask(DataStoreMetaInfo properties)` Constructs a new Standard Update Task.

Method Summary
`void` | `update()` Downloads the latest NVD CVE XML file from the web and imports it into the current CVE Database.
`protected Updateable` | `updatesNeeded()` Determines if the index needs to be updated.

Methods inherited from class org.owasp.dependencycheck.data.update.AbstractUpdateTask
`closeDataStores, deleteExistingData, getCpeIndex, getCveDB, getProperties, getUpdateable, importXML, isUpdateNeeded, openDataStores, setDeleteAndRecreate, shouldDeleteAndRecreate, withinRange`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StandardUpdateTask

    public StandardUpdateTask(DataStoreMetaInfo properties)
                       throws MalformedURLException,
                              DownloadFailedException,
                              UpdateException

  Constructs a new Standard Update Task.

  Parameters:
    `properties` - information about the data store
  Throws:
    `MalformedURLException` - thrown if a configured URL is malformed
    `DownloadFailedException` - thrown if a timestamp cannot be checked on a configured URL
    `UpdateException` - thrown if there is an exception generating the update task

Method Detail

### update

    public void update()
                throws UpdateException

  Downloads the latest NVD CVE XML file from the web and imports it into the current CVE Database.

  Specified by:
    `update` in interface `UpdateTask`
  Specified by:
    `update` in class `AbstractUpdateTask`
  Throws:
    `UpdateException` - is thrown if there is an error updating the database

### updatesNeeded

    protected Updateable updatesNeeded()
                                throws MalformedURLException,
                                       DownloadFailedException,
                                       UpdateException

  Determines if the index needs to be updated. This is done by fetching the NVD CVE meta data and checking the last update date. If the data needs to be refreshed this method will return the NvdCveUrl for the files that need to be updated.

  Specified by:
    `updatesNeeded` in class `AbstractUpdateTask`
  Returns:
    the collection of files that need to be updated
  Throws:
    `MalformedURLException` - is thrown if the URL for the NVD CVE Meta data is incorrect
    `DownloadFailedException` - is thrown if there is an error. downloading the NVD CVE download data file
    `UpdateException` - Is thrown if there is an issue with the last updated properties file

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012-2013 OWASP. All Rights Reserved.