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 DataStoreMetaInfo

    java.lang.Object
      org.owasp.dependencycheck.data.update.DataStoreMetaInfo

    public class DataStoreMetaInfo

extends Object

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

Field Summary
`static String` | `BATCH` Batch key word, used as key to store information about batch mode.
`static String` | `LAST_UPDATED` The properties file key for the last updated field - used to store the last updated time of the Modified NVD CVE xml file.
`static String` | `LAST_UPDATED_BASE` Stores the last updated time for each of the NVD CVE files.
`static String` | `MODIFIED` Modified key word, used as a key to store information about the modified file (i.e.

Constructor Summary
`DataStoreMetaInfo()` Constructs a new data properties object.

Method Summary
`static File` | `getPropertiesFile()` Retrieves the properties file.
`String` | `getProperty(String key)` Returns the property value for the given key.
`String` | `getProperty(String key, String defaultValue)` Returns the property value for the given key.
`protected boolean` | `isBatchUpdateMode()` Get the value of batchUpdateMode.
`boolean` | `isEmpty()` Returns whether or not any properties are set.
`void` | `save(NvdCveInfo updatedValue)` Writes a properties file containing the last updated date to the VULNERABLE_CPE directory.
`protected void` | `setBatchUpdateMode(boolean batchUpdateMode)` Set the value of batchUpdateMode.

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

Field Detail

### BATCH

    public static final String BATCH

  Batch key word, used as key to store information about batch mode.

  See Also:
    Constant Field Values

### MODIFIED

    public static final String MODIFIED

  Modified key word, used as a key to store information about the modified file (i.e. the containing the last 8 days of updates)..

  See Also:
    Constant Field Values

### LAST_UPDATED

    public static final String LAST_UPDATED

  The properties file key for the last updated field - used to store the last updated time of the Modified NVD CVE xml file.

  See Also:
    Constant Field Values

### LAST_UPDATED_BASE

    public static final String LAST_UPDATED_BASE

  Stores the last updated time for each of the NVD CVE files. These timestamps should be updated if we process the modified file within 7 days of the last update.

  See Also:
    Constant Field Values

Constructor Detail

### DataStoreMetaInfo

    public DataStoreMetaInfo()

  Constructs a new data properties object.

Method Detail

### isBatchUpdateMode

    protected boolean isBatchUpdateMode()

  Get the value of batchUpdateMode.

  Returns:
    the value of batchUpdateMode

### setBatchUpdateMode

    protected void setBatchUpdateMode(boolean batchUpdateMode)

  Set the value of batchUpdateMode.

  Parameters:
    `batchUpdateMode` - new value of batchUpdateMode

### isEmpty

    public boolean isEmpty()

  Returns whether or not any properties are set.

  Returns:
    whether or not any properties are set

### save

    public void save(NvdCveInfo updatedValue)
              throws UpdateException

  Writes a properties file containing the last updated date to the VULNERABLE_CPE directory.

  Parameters:
    `updatedValue` - the updated nvdcve entry
  Throws:
    `UpdateException` - is thrown if there is an update exception

### getProperty

    public String getProperty(String key)

  Returns the property value for the given key. If the key is not contained in the underlying properties null is returned.

  Parameters:
    `key` - the property key
  Returns:
    the value of the property

### getProperty

    public String getProperty(String key,
                              String defaultValue)

  Returns the property value for the given key. If the key is not contained in the underlying properties the default value is returned.

  Parameters:
    `key` - the property key
    `defaultValue` - the default value
  Returns:
    the value of the property

### getPropertiesFile

    public static File getPropertiesFile()

  Retrieves the properties file.

  Returns:
    the 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.