public interface ConfigPropertySet
For external property definitions (for example using a .properties file), the actual property name is
composed using the property set name returned by getName() and the given specific name. For
example, if the property set name is test and the property name is prop, the actual
property name will be test.prop.
ConfigProperty| Modifier and Type | Interface and Description |
|---|---|
static interface |
ConfigPropertySet.Builder<C extends ConfigPropertySet>
Builder to create
ConfigPropertySets bound to property data sources. |
static class |
ConfigPropertySet.ConfigurationException
Exception thrown for configuration errors.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getConfigPropertyValue(ConfigProperty<T> property,
T defaultValue)
Returns the value associated to given
property. |
String |
getName()
Configuration property set name, used as property definition prefix.
|
Map<String,String> |
getSubPropertiesUsingPrefix(String prefix)
Get a key-value
Map of all the properties at sub levels of this property set, starting from given prefix. |
<T> boolean |
hasConfigProperty(ConfigProperty<T> property)
Checks whether this property set contains a not
null value associated to given
property. |
String getName()
<T> boolean hasConfigProperty(ConfigProperty<T> property)
null value associated to given
property.T - Property typeproperty - Property to check (not null)true if this property set contains a not null value associated to given
property<T> T getConfigPropertyValue(ConfigProperty<T> property, T defaultValue)
property.T - Property typeproperty - Configuration property to read (not null)defaultValue - Default value to return if property was not found or has no valuedefaultValue if not foundMap<String,String> getSubPropertiesUsingPrefix(String prefix)
Map of all the properties at sub levels of this property set, starting from given prefix.prefix - Prefix to use (not null)Copyright © 2017 The Holon Platform. All rights reserved.