|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.settings.SettingsManager
public class SettingsManager
Facade for working with Settings
. Provides methods for
Settings
creation, export, import, ...
Creation of Settings
is delegated to a
SettingsFactory
.
The export and import of Settings
is done with xml files
Field Summary | |
---|---|
static String |
INTERNAL
|
static String |
USER
|
Constructor Summary | |
---|---|
SettingsManager()
|
Method Summary | |
---|---|
Settings |
createSettings(String key)
Returns the Settings for the given key. |
void |
exportSettings(Settings settings,
OutputStream out)
Export settings to an OutputStream |
Settings |
getInternalSettings()
Returns the internal settings, i.e. |
SettingsFactory |
getSettingsFactory()
Returns the settings factory. |
Settings |
getUserSettings()
Returns the user settings, i.e. |
void |
importSettings(Settings settings,
InputStream in)
Import settings from an InputStream |
void |
setSettingsFactory(SettingsFactory factory)
Set the settings factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String INTERNAL
public static final String USER
Constructor Detail |
---|
public SettingsManager()
Method Detail |
---|
public Settings getInternalSettings() throws SettingsException
Settings
SettingsException
public Settings getUserSettings() throws SettingsException
Settings
SettingsException
public Settings createSettings(String key) throws SettingsException
Settings
for the given key. This method should
not be called directly, use getInternalSettings()
or getUserSettings()
instead.
key
- the key
SettingsException
- if the Settings
could not be createdpublic void setSettingsFactory(SettingsFactory factory)
null
,
the TransientSettingsFactory will be used.
factory
- the factorypublic SettingsFactory getSettingsFactory()
public void exportSettings(Settings settings, OutputStream out) throws IOException
settings
to an OutputStream
settings
- the settings
out
- the OutputStream
IOException
- if the settings could not be exportedpublic void importSettings(Settings settings, InputStream in) throws IOException
settings
from an InputStream
settings
- the settings
in
- the InputStream
IOException
- if the settings could not be imported
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |