Package org.spdx
Class Configuration
- java.lang.Object
-
- org.spdx.Configuration
-
public final class Configuration extends Object
The configuration class for the Spdx-Java-Library. When a caller attempts to retrieve a configuration property, it will first be checked in the Java system properties (i.e. set via `-D` command line options to the JVM, or by programmatic calls to `System.setProperty()` in code), and will then fall back on a properties file in the classpath. That file must be called `/resources/spdx-java-library.properties`.Please see the documentation for specifics on what configuration options Spdx-Java-Library supports, and how they impact the library's behavior.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Configuration
getInstance()
String
getProperty(String propertyName)
String
getProperty(String propertyName, String defaultValue)
-
-
-
Method Detail
-
getInstance
public static Configuration getInstance()
- Returns:
- The singleton instance of the Configuration class.
-
getProperty
public String getProperty(String propertyName)
- Parameters:
propertyName
- The name of the configuration property to retrieve.- Returns:
- The value of the given property name, or null if it wasn't found.
-
getProperty
public String getProperty(String propertyName, String defaultValue)
- Parameters:
propertyName
- The name of the configuration property to retrieve.defaultValue
- The default value to return, if the property isn't found.- Returns:
- The value of the given property name, or defaultValue if it wasn't found.
-
-