|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a plugin that handles persistency of user preferences.
Method Summary | |
JwmaPreferencesImpl |
getPreferencesTemplate(JwmaSession session)
Returns a copy of the template JwmaPreferencesImpl instance. |
boolean |
isPersistent(java.lang.String identity)
Tests if preferences for the given user exist on the store. |
JwmaPreferencesImpl |
loadPreferences(java.lang.String identity)
Loads the given user's preferences from the persistent store and returns them as a JwmaPreferencesImpl instance. |
void |
savePreferences(JwmaPreferencesImpl prefs)
Saves the given preferences to the persistent store. |
void |
setPreferencesTemplate(JwmaPreferencesImpl template)
Sets the template JwmaPreferencesImpl instance. |
Methods inherited from interface dtw.webmail.plugin.JwmaPlugin |
activate, deactivate |
Method Detail |
public JwmaPreferencesImpl loadPreferences(java.lang.String identity) throws JwmaException
If preferences for the given user do not exist on the store, the method returns null.
identity
- a String representing the user
(in a unique way).
JwmaException
- if an I/O error occurs.JwmaPreferencesImpl
,
JwmaPreferences.getUserIdentity()
public void savePreferences(JwmaPreferencesImpl prefs) throws JwmaException
If the preferences do not exist on the store,
the method should create them, otherwise update
the existing version.
The identity is retrieved using the getUserIdentity()
method of the given JwmaPreferencesImpl instance.
prefs
- the JwmaPreferencesImpl instance to
saved.
JwmaException
- if an I/O error occurs.JwmaPreferencesImpl
,
JwmaPreferences.getUserIdentity()
public boolean isPersistent(java.lang.String identity) throws JwmaException
identity
- a String representing the user
(in a unique way).
JwmaException
- if an I/O error occurs.JwmaPreferences.getUserIdentity()
public JwmaPreferencesImpl getPreferencesTemplate(JwmaSession session)
session
- the actual JwmaSession instance.
JwmaPreferencesImpl
public void setPreferencesTemplate(JwmaPreferencesImpl template) throws JwmaException
The caller assumes that the plugin handles the persistence of the passed in template instance.
template
- JwmaPreferencesImpl instance.
JwmaException
- if an I/O error occurs.JwmaPreferencesImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |