|
||||||||||
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.
Field Summary | |
---|---|
static String |
PERM_ONLY FIXME: Use this as boot properties. |
Constructor Summary | |
---|---|
InMemoryConfigurationRepositoryManagement(PropertyDescriptorRegistry registry, ConfigurationPropertiesManagementFactory factory) 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 . |
void |
release() Releases resources acquired by this instance. |
String |
toString() Returns the string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PERM_ONLY
"store.permonly"
Constructor Detail |
---|
public InMemoryConfigurationRepositoryManagement(PropertyDescriptorRegistry registry, ConfigurationPropertiesManagementFactory factory)
registry
- the registry to resolve property descriptors.
factory
- the factory to create instance of
ConfigurationPropertiesManagement
on demand.
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.
ConfigurationRepository.getProperties(ConfigurationKey)
null
.
de.smartics.util.lang.NullArgumentException
- if
key
is
null
.
MissingConfigurationException
- if there is no configuration for the given key.
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.
ConfigurationRepository.getProperties(ConfigurationKey)
null
.
de.smartics.util.lang.NullArgumentException
- if
key
is
null
.
MissingConfigurationException
- if there is no configuration for the given key.
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
public void release()
ConfigurationRepositoryManagement
release
in interface
ConfigurationRepository
release
in interface
ConfigurationRepositoryManagement
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |