public class PropertyConfiguration extends Object
| Constructor and Description |
|---|
PropertyConfiguration(String classpathName)
loads a properties file from classpath
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(String propertyKey) |
boolean |
getBooleanProperty(String propertyKey) |
<T extends Enum<T>> |
getEnumProperty(String propertyKey,
Class<T> enumType)
assembles mandatory enum property from
properties bag |
String |
getStringProperty(String propertyKey)
gets mandatory String property from
properties bag |
public PropertyConfiguration(String classpathName)
classpathName - classpath resource name, ex. "resources/config.properties"public <T extends Enum<T>> T getEnumProperty(String propertyKey, Class<T> enumType)
properties bagJaversException - UNDEFINED_PROPERTYJaversException - MALFORMED_PROPERTYpublic boolean contains(String propertyKey)
public String getStringProperty(String propertyKey)
properties bagJaversException - UNDEFINED_PROPERTYpublic boolean getBooleanProperty(String propertyKey)
JaversException - UNDEFINED_PROPERTYCopyright © 2014. All rights reserved.