|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.emarsys.ecommon.prefs.config.backend.NamedConfigurationBackend
public class NamedConfigurationBackend
A more verbose version of ConfigurationBackend
that has
an associated name.
Field Summary | |
---|---|
protected java.lang.String |
name
|
protected ConfigurationBackend |
settings
|
Constructor Summary | |
---|---|
NamedConfigurationBackend(java.lang.String name,
ConfigurationBackend settings)
|
Method Summary | |
---|---|
ISetting |
get(java.lang.String name)
Retrieves the ISetting with the passed name. |
java.lang.String |
getName()
|
java.util.List<ISetting> |
getSettings()
Retrieves all ISetting s from this backend. |
void |
set(ISetting setting)
Sets the passed setting which must not be null
in this configuration backend, if a setting with the given
name is already present it will be overridden. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final java.lang.String name
protected final ConfigurationBackend settings
Constructor Detail |
---|
public NamedConfigurationBackend(java.lang.String name, ConfigurationBackend settings)
name
- Method Detail |
---|
public ISetting get(java.lang.String name) throws java.lang.IllegalArgumentException
ConfigurationBackend
ISetting
with the passed name.
get
in interface ConfigurationBackend
name
-
java.lang.IllegalArgumentException
com.emarsys.core.setting.backend.ConfigurationBackend#get(java.lang.String)
public void set(ISetting setting) throws java.lang.IllegalArgumentException
ConfigurationBackend
null
in this configuration backend, if a setting with the given
name is already present it will be overridden.
The next call to ConfigurationBackend.get(String)
with the passed
setting's name will return the passed setting.
set
in interface ConfigurationBackend
java.lang.IllegalArgumentException
- - if the passed setting,
its name or value is null
.com.emarsys.core.setting.backend.ConfigurationBackend#set(ISetting)
public java.util.List<ISetting> getSettings()
ConfigurationBackend
Retrieves all ISetting
s from this backend.
What exactly "all" means in the context of the concrete
ConfigurationBackend
is up to the implementation.
For instance the List
may or may not contain
default values or fallbacked ISetting
s or might
even return a cached list.
The only requirement for this method is to be logically in
synch with ConfigurationBackend.get(String)
and ConfigurationBackend.set(ISetting)
.
Thus if a Setting is inserted/updated/deleted and nothing
is changed in the meantime the next call to
ConfigurationBackend.getSettings()
has to reflect the changes made.
getSettings
in interface ConfigurationBackend
List
of ISetting
s,
never null
.com.emarsys.core.setting.backend.ConfigurationBackend#getSettings()
public java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |