public interface UserProfile
This works similarly to Preferences
, except that
it is possible to switch between multiple profiles within a single operating
system user account. This is provided because sharing an OS account by all
users is a widespread practice on computers attached to scientific equipment.
The user profile stores the same kinds of values as PropertyMap
,
but is mutable and periodically saves any modifications (if thus set up by
the system).
Modifier and Type | Method and Description |
---|---|
void |
clearSettingsForAllClasses()
Reset this user profile, deleting all settings.
|
java.lang.Boolean |
getBoolean(java.lang.Class<?> c,
java.lang.String key,
java.lang.Boolean fallback)
Deprecated.
use
getSettings(c).getBoolean(key, fallback) instead |
java.lang.Boolean[] |
getBooleanArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.Boolean[] fallback)
Deprecated.
use
getSettings(c).getBooleanList(key, fallback) instead |
java.lang.Double |
getDouble(java.lang.Class<?> c,
java.lang.String key,
java.lang.Double fallback)
Deprecated.
use
getSettings(c).getDouble(key, fallback) instead |
java.lang.Double[] |
getDoubleArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.Double[] fallback)
Deprecated.
use
getSettings(c).getDoubleList(key, fallback) instead |
java.lang.Integer |
getInt(java.lang.Class<?> c,
java.lang.String key,
java.lang.Integer fallback)
Deprecated.
use
getSettings(c).getInteger(key, fallback) instead |
java.lang.Integer[] |
getIntArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.Integer[] fallback)
Deprecated.
use
getSettings(c).getIntegerList(key, fallback) instead |
java.lang.Long |
getLong(java.lang.Class<?> c,
java.lang.String key,
java.lang.Long fallback)
Deprecated.
use
getSettings(c).getLong(key, fallback) instead |
java.lang.Long[] |
getLongArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.Long[] fallback)
Deprecated.
use
getSettings(c).getLongList(key, fallback) instead |
java.lang.String |
getProfileName()
Return the name of this profile as displayed to the user
|
MutablePropertyMapView |
getSettings(java.lang.Class<?> owner)
Get an interface to save and retrieve settings.
|
java.lang.String |
getString(java.lang.Class<?> c,
java.lang.String key,
java.lang.String fallback)
Deprecated.
use
getSettings(c).getString(key, fallback) instead |
java.lang.String[] |
getStringArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.String[] fallback)
Deprecated.
use
getSettings(c).getStringList(key, fallback) instead |
void |
setBoolean(java.lang.Class<?> c,
java.lang.String key,
java.lang.Boolean value)
Deprecated.
use
getSettings(c).putBoolean(key, value) instead |
void |
setBooleanArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.Boolean[] value)
Deprecated.
use
getSettings(c).putBooleanList(key, value) instead |
void |
setDouble(java.lang.Class<?> c,
java.lang.String key,
java.lang.Double value)
Deprecated.
use
getSettings(c).putDouble(key, value) instead |
void |
setDoubleArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.Double[] value)
Deprecated.
use
getSettings(c).putDoubleList(key, value) instead |
void |
setInt(java.lang.Class<?> c,
java.lang.String key,
java.lang.Integer value)
Deprecated.
use
getSettings(c).putInteger(key, value) instead |
void |
setIntArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.Integer[] value)
Deprecated.
use
getSettings(c).putIntegerList(key, value) instead |
void |
setLong(java.lang.Class<?> c,
java.lang.String key,
java.lang.Long value)
Deprecated.
use
getSettings(c).putLong(key, value) instead |
void |
setLongArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.Long[] value)
Deprecated.
use
getSettings(c).putLongList(key, value) instead |
void |
setString(java.lang.Class<?> c,
java.lang.String key,
java.lang.String value)
Deprecated.
use
getSettings(c).putString(key, value) instead |
void |
setStringArray(java.lang.Class<?> c,
java.lang.String key,
java.lang.String[] value)
Deprecated.
use
getSettings(c).putStringList(key, value) instead |
java.lang.String getProfileName()
MutablePropertyMapView getSettings(java.lang.Class<?> owner)
This is the main interface for accessing values in the user profile.
owner
- the class that "owns" the settingsvoid clearSettingsForAllClasses()
Do not confuse with getSettings(owner).clear()
!
@Deprecated java.lang.String getString(java.lang.Class<?> c, java.lang.String key, java.lang.String fallback)
getSettings(c).getString(key, fallback)
instead@Deprecated java.lang.String[] getStringArray(java.lang.Class<?> c, java.lang.String key, java.lang.String[] fallback)
getSettings(c).getStringList(key, fallback)
instead@Deprecated void setString(java.lang.Class<?> c, java.lang.String key, java.lang.String value)
getSettings(c).putString(key, value)
instead@Deprecated void setStringArray(java.lang.Class<?> c, java.lang.String key, java.lang.String[] value)
getSettings(c).putStringList(key, value)
instead@Deprecated java.lang.Integer getInt(java.lang.Class<?> c, java.lang.String key, java.lang.Integer fallback)
getSettings(c).getInteger(key, fallback)
instead@Deprecated java.lang.Integer[] getIntArray(java.lang.Class<?> c, java.lang.String key, java.lang.Integer[] fallback)
getSettings(c).getIntegerList(key, fallback)
instead@Deprecated void setInt(java.lang.Class<?> c, java.lang.String key, java.lang.Integer value)
getSettings(c).putInteger(key, value)
instead@Deprecated void setIntArray(java.lang.Class<?> c, java.lang.String key, java.lang.Integer[] value)
getSettings(c).putIntegerList(key, value)
instead@Deprecated java.lang.Long getLong(java.lang.Class<?> c, java.lang.String key, java.lang.Long fallback)
getSettings(c).getLong(key, fallback)
instead@Deprecated java.lang.Long[] getLongArray(java.lang.Class<?> c, java.lang.String key, java.lang.Long[] fallback)
getSettings(c).getLongList(key, fallback)
instead@Deprecated void setLong(java.lang.Class<?> c, java.lang.String key, java.lang.Long value)
getSettings(c).putLong(key, value)
instead@Deprecated void setLongArray(java.lang.Class<?> c, java.lang.String key, java.lang.Long[] value)
getSettings(c).putLongList(key, value)
instead@Deprecated java.lang.Double getDouble(java.lang.Class<?> c, java.lang.String key, java.lang.Double fallback)
getSettings(c).getDouble(key, fallback)
instead@Deprecated java.lang.Double[] getDoubleArray(java.lang.Class<?> c, java.lang.String key, java.lang.Double[] fallback)
getSettings(c).getDoubleList(key, fallback)
instead@Deprecated void setDouble(java.lang.Class<?> c, java.lang.String key, java.lang.Double value)
getSettings(c).putDouble(key, value)
instead@Deprecated void setDoubleArray(java.lang.Class<?> c, java.lang.String key, java.lang.Double[] value)
getSettings(c).putDoubleList(key, value)
instead@Deprecated java.lang.Boolean getBoolean(java.lang.Class<?> c, java.lang.String key, java.lang.Boolean fallback)
getSettings(c).getBoolean(key, fallback)
instead@Deprecated java.lang.Boolean[] getBooleanArray(java.lang.Class<?> c, java.lang.String key, java.lang.Boolean[] fallback)
getSettings(c).getBooleanList(key, fallback)
instead@Deprecated void setBoolean(java.lang.Class<?> c, java.lang.String key, java.lang.Boolean value)
getSettings(c).putBoolean(key, value)
instead@Deprecated void setBooleanArray(java.lang.Class<?> c, java.lang.String key, java.lang.Boolean[] value)
getSettings(c).putBooleanList(key, value)
instead