|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.config.support.InMemoryConfigurationRepositoryManagement
@ThreadSafe public final class InMemoryConfigurationRepositoryManagement
Stores all configurations in memory.
Constructor Summary | |
---|---|
InMemoryConfigurationRepositoryManagement(PropertyDescriptorRegistry registry) Default constructor. |
Method Summary | |
---|---|
ConfigurationPropertiesManagement |
deregisterProperties(ConfigurationKey key) Removes the configuration properties for the given configuration key. |
Collection<ConfigurationKey> |
getKeys() Returns the list of keys with configuration properties. |
ConfigurationProperties |
getProperties(ConfigurationKey key) Fetches the properties for the given configuration key . |
ConfigurationPropertiesManagement |
getPropertiesManagement(ConfigurationKey key) Fetches the properties management for the given configuration key. |
ConfigurationPropertiesManagement |
getPropertiesManagementWithDefaults(ConfigurationKey key) Fetches the properties management for the given configuration key. |
PropertyDescriptorRegistry |
getRegistry() Returns the registry to resolve property descriptors. |
boolean |
hasPropertiesManagement(ConfigurationKey key) Checks if a properties management for the given configuration key is present. |
void |
registerProperties(ConfigurationKey key, ConfigurationPropertiesManagement configurationProperties) Registers the given configuration properties for the given configuration key . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InMemoryConfigurationRepositoryManagement(PropertyDescriptorRegistry registry)
registry
- the registry to resolve property descriptors.
Method Detail |
---|
public PropertyDescriptorRegistry getRegistry()
getRegistry
in interface
ConfigurationRepositoryManagement
public ConfigurationProperties getProperties(ConfigurationKey key) throws de.smartics.util.lang.NullArgumentException, MissingConfigurationException
ConfigurationRepository
key
.
getProperties
in interface
ConfigurationRepository
key
- the key that specifies an application in its environment.
null
.
de.smartics.util.lang.NullArgumentException
- if
key
is
null
.
MissingConfigurationException
- if there is no configuration for the given
key
.
public ConfigurationPropertiesManagement getPropertiesManagementWithDefaults(ConfigurationKey key) throws de.smartics.util.lang.NullArgumentException, MissingConfigurationException
ConfigurationRepositoryManagement
getPropertiesManagementWithDefaults
in interface
ConfigurationRepositoryManagement
key
- the key that specifies an application in its environment.
null
.
de.smartics.util.lang.NullArgumentException
- if
key
is
null
.
MissingConfigurationException
- if there is no configuration for the given key.
ConfigurationRepository.getProperties(ConfigurationKey)
public ConfigurationPropertiesManagement getPropertiesManagement(ConfigurationKey key) throws de.smartics.util.lang.NullArgumentException, MissingConfigurationException
ConfigurationRepositoryManagement
getPropertiesManagement
in interface
ConfigurationRepositoryManagement
key
- the key that specifies an application in its environment.
null
.
de.smartics.util.lang.NullArgumentException
- if
key
is
null
.
MissingConfigurationException
- if there is no configuration for the given key.
ConfigurationRepository.getProperties(ConfigurationKey)
public boolean hasPropertiesManagement(ConfigurationKey key) throws de.smartics.util.lang.NullArgumentException
ConfigurationRepositoryManagement
hasPropertiesManagement
in interface
ConfigurationRepositoryManagement
key
- the key that specifies an application in its environment.
true
if the configuration is present,
false
if not.
de.smartics.util.lang.NullArgumentException
- if
key
is
null
.
public void registerProperties(ConfigurationKey key, ConfigurationPropertiesManagement configurationProperties) throws de.smartics.util.lang.NullArgumentException, DuplicateConfigurationException
ConfigurationRepositoryManagement
key
.
registerProperties
in interface
ConfigurationRepositoryManagement
key
- the key that specifies an application in its environment.
configurationProperties
- the configuration properties to register by the given
key
.
de.smartics.util.lang.NullArgumentException
- if
key
or
configurationProperties
is
null
.
DuplicateConfigurationException
- if a configuration with the given key is already registered.
public ConfigurationPropertiesManagement deregisterProperties(ConfigurationKey key) throws de.smartics.util.lang.NullArgumentException
ConfigurationRepositoryManagement
deregisterProperties
in interface
ConfigurationRepositoryManagement
key
- the key that specifies an application in its environment.
null
.
de.smartics.util.lang.NullArgumentException
- if
key
is
null
.
public Collection<ConfigurationKey> getKeys()
ConfigurationRepositoryManagement
getKeys
in interface
ConfigurationRepositoryManagement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |