|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.homeunix.thecave.buddi.plugin.api.PreferenceAccess
public abstract class PreferenceAccess
An abstract class which provides plugins the functionality of storing and reading preferences in the main Buddi preferences file.
| Constructor Summary | |
|---|---|
PreferenceAccess()
|
|
| Method Summary | |
|---|---|
java.util.List<java.lang.String> |
getListPreference(java.lang.String key)
Returns the list associated with the given key. |
java.lang.String |
getPreference(java.lang.String key)
Loads the value which is associated with the given key. |
java.lang.String |
getSecurePreference(java.lang.String key,
char[] password)
Loads the value which is associated with the given key, after decrypting the value using the given password. |
void |
putListPreference(java.lang.String key,
java.util.List<java.lang.String> values)
Sets the given list of strings in the preferences map, using the given key. |
void |
putPreference(java.lang.String key,
java.lang.String value)
Stores the value associated with a given key. |
void |
putSecurePreference(java.lang.String key,
java.lang.String value,
char[] password)
Stores the value, encrypted using the given password, into the preferences file using the given key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PreferenceAccess()
| Method Detail |
|---|
public java.lang.String getPreference(java.lang.String key)
key - The key to read.
public void putPreference(java.lang.String key,
java.lang.String value)
key - The key to save. In order to ensure that you do not
overwrite the preferences for another plugin, you must use
the key format as follows:
"package.Plugin.property"
For instance, use the key "com.example.buddi.ImportFoo.LAST_EXECUTE_DAY"
instead of the key "LAST_EXECUTE_DAY".value - The value to store. Can be any valid String.
public void putListPreference(java.lang.String key,
java.util.List<java.lang.String> values)
key - The key to save. In order to ensure that you do not
overwrite the preferences for another plugin, you must use
the key format as follows:
"package.Plugin.property"
For instance, use the key "com.example.buddi.ImportFoo.LAST_EXECUTE_DAY"
instead of the key "LAST_EXECUTE_DAY".values - The list of values to storepublic java.util.List<java.lang.String> getListPreference(java.lang.String key)
key - The key to save. In order to ensure that you do not
overwrite the preferences for another plugin, you must use
the key format as follows:
"package.Plugin.property"
For instance, use the key "com.example.buddi.ImportFoo.LAST_EXECUTE_DAY"
instead of the key "LAST_EXECUTE_DAY".
public java.lang.String getSecurePreference(java.lang.String key,
char[] password)
throws PluginException
key - password -
PluginException
public void putSecurePreference(java.lang.String key,
java.lang.String value,
char[] password)
throws PluginException
key - value - password -
PluginException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||