|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigurationBackend
A ConfigurationBackend
encapsulates a generic
backend that provides access to ISetting
s.
ConfigurationBackend
implementations could delegate to a
Properties
or Preferences
object or
query a DB or some other storage mechanism.
TODO ConfigurationBackend.class
Method Summary | |
---|---|
ISetting |
get(java.lang.String name)
Retrieves the ISetting with the passed name. |
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. |
Method Detail |
---|
ISetting get(java.lang.String name) throws java.lang.IllegalArgumentException
ISetting
with the passed name.
ISetting
with the
passed name or null
if not present.
java.lang.IllegalArgumentException
- - if the passed name is
null
.void set(ISetting setting) throws java.lang.IllegalArgumentException
null
in this configuration backend, if a setting with the given
name is already present it will be overridden.
The next call to get(String)
with the passed
setting's name will return the passed setting.
setting
-
java.lang.IllegalArgumentException
- - if the passed setting,
its name or value is null
.java.util.List<ISetting> getSettings()
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 get(String)
and set(ISetting)
.
Thus if a Setting is inserted/updated/deleted and nothing
is changed in the meantime the next call to
getSettings()
has to reflect the changes made.
List
of ISetting
s,
never null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |