public interface SettingsService
| Modifier and Type | Method and Description |
|---|---|
void |
addSetting(SettingDefinition<?> def) |
void |
addSettings(Collection<SettingDefinition<?>> defs) |
void |
changeSetting(SettingValue<?> newValue)
Changes a setting.
|
void |
configure(Object object)
Configure
o with the required settings. |
void |
configureOnce(Object object)
Configure
o with the required settings. |
void |
deleteAll()
Deletes all settings and users.
|
void |
deleteSetting(SettingDefinition<?> setting)
Deletes the setting defined by
setting. |
SettingDefinition<?> |
getDefinitionByKey(String key)
Get the definition that is defined with the specified key.
|
Set<String> |
getKeys() |
<T> SettingValue<T> |
getSetting(SettingDefinition<T> key)
Gets the value of the setting defined by
key. |
<T> SettingValue<T> |
getSetting(String key)
Gets the value of the setting defined by
key. |
Set<SettingDefinition<?>> |
getSettingDefinitions()
Gets all
SettingDefinitions known by this class. |
SettingValueFactory |
getSettingFactory() |
Map<SettingDefinition<?>,SettingValue<?>> |
getSettings()
Gets all values for all definitions.
|
void |
reconfigure()
Gets all values for all definitions and udpates (changes or configures) all configured objets.
|
void changeSetting(SettingValue<?> newValue) throws ConfigurationError
newValue - the new value of the settingConfigurationError - if there is a problem changing the setting.void configure(Object object) throws ConfigurationError
o with the required settings. All changes to a setting required by the object will be applied.object - the object to configureConfigurationError - if there is a problem configuring the objectConfigurable,
Settingvoid configureOnce(Object object) throws ConfigurationError
o with the required settings. Future changes to settings will not be propagated to the object.object - the object to configureConfigurationError - if there is a problem configuring the objectconfigure(java.lang.Object)void deleteAll()
void deleteSetting(SettingDefinition<?> setting) throws ConfigurationError
setting.setting - the definitionConfigurationError - if there is a problem deleting the settingSettingDefinition<?> getDefinitionByKey(String key)
key - the keynull if there is no definition for the key<T> SettingValue<T> getSetting(SettingDefinition<T> key)
key.T - the type of the setting and valuekey - the definition of the setting<T> SettingValue<T> getSetting(String key)
key.T - the type of the setting and valuekey - the id of the settingSet<SettingDefinition<?>> getSettingDefinitions()
SettingDefinitions known by this class.SettingValueFactory getSettingFactory()
SettingValueFactory to produce valuesMap<SettingDefinition<?>,SettingValue<?>> getSettings()
null is added to the map.void reconfigure()
void addSetting(SettingDefinition<?> def)
void addSettings(Collection<SettingDefinition<?>> defs)
Copyright © 2015–2021 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.