Class ConfigurationPropertiesImpl
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties
-
- edu.cornell.mannlib.vitro.webapp.config.ConfigurationPropertiesImpl
-
public class ConfigurationPropertiesImpl extends ConfigurationProperties
The basic implementation of ConfigurationProperties. It loads the configuration properties from a properties file and stores them in a map. It also permits the caller to supply a map of "preemptive" properties that will be included and will override any matching properties from the file, and a map of "build" properties that may be overridden by the file. Leading and trailing white space are trimmed from the property values. Once the properties have been parsed and stored, they are immutable.
-
-
Constructor Summary
Constructors Constructor Description ConfigurationPropertiesImpl(InputStream stream, Map<String,String> preemptiveProperties, Map<String,String> buildProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetProperty(String key)Get the value of the property, ornullif the property has not been assigned a value.StringgetProperty(String key, String defaultValue)Get the value of the property, or use the default value if the property has not been assigned a value.Map<String,String>getPropertyMap()Get a copy of the map of the configuration properties and their settings.StringtoString()
-
-
-
Constructor Detail
-
ConfigurationPropertiesImpl
public ConfigurationPropertiesImpl(InputStream stream, Map<String,String> preemptiveProperties, Map<String,String> buildProperties) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getProperty
public String getProperty(String key)
Description copied from class:ConfigurationPropertiesGet the value of the property, ornullif the property has not been assigned a value.- Specified by:
getPropertyin classConfigurationProperties
-
getProperty
public String getProperty(String key, String defaultValue)
Description copied from class:ConfigurationPropertiesGet the value of the property, or use the default value if the property has not been assigned a value.- Specified by:
getPropertyin classConfigurationProperties
-
getPropertyMap
public Map<String,String> getPropertyMap()
Description copied from class:ConfigurationPropertiesGet a copy of the map of the configuration properties and their settings. Because this is a copy, it cannot be used to modify the settings.- Specified by:
getPropertyMapin classConfigurationProperties
-
-