
public class PreferencesConnector extends AbstractPropertyConnector
Preferences feature of Java.
Locations:
| Constructor and Description |
|---|
PreferencesConnector()
Default Constructor initialize the User and System
Preferences. |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getPreferenceValue(String path,
String key,
String defaultValue,
Preferences preferences)
Resolve the given path and key against the given Preferences.
|
protected String |
getProperty(String keyPath,
String defaultValue)
Very similar to
System.getProperty except that the SecurityException is hidden. |
protected void |
setPreferenceValue(String path,
String key,
String value,
Preferences preferences)
Resolve the given path and key against the given Preferences.
|
void |
setString(String keyPath,
String value)
Stores the given Value into the User-Preferences.
|
void |
setSystemString(String keyPath,
String value)
Stores the given Value into the System-Preferences.
|
getContent, getObject, getStringaddConnector, getConnectors, getContentResolver, getName, getObjectResolver, init, setContentResolver, setName, setObjectResolverpublic PreferencesConnector()
Preferences.protected String getProperty(String keyPath, String defaultValue)
System.getProperty except that the SecurityException is hidden.getProperty in class AbstractPropertyConnectorkeyPath - The key to search for.defaultValue - The default value to return.protected String getPreferenceValue(String path, String key, String defaultValue, Preferences preferences)
path - the preferences path (placeholder part before '/')key - the preferences key (placeholder part after '/')defaultValue - the default Value.preferences - the Preferences to resolve againstnull if none foundpublic void setString(String keyPath, String value)
keyPath - - The full KeyPathvalue - - The new Valuepublic void setSystemString(String keyPath, String value)
keyPath - - The full KeyPathvalue - - The new Valueprotected void setPreferenceValue(String path, String key, String value, Preferences preferences)
path - the preferences path (placeholder part before '/')key - the preferences key (placeholder part after '/')value - the Value to store.preferences - the Preferences to resolve againstCopyright © 2008–2014. All rights reserved.