Package ch.tocco.nice2.usersettings.api
Interface Preferences
- All Superinterfaces:
 ReadOnlyMap<String>,WriteableMap<String>
- All Known Implementing Classes:
 PreferencesImpl
- 
Field Summary
Fields - 
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the preferences map.getNode()The node identifying this preferences map.booleanvoidreload()Reloads all values from the storage.voidsave()Saves all changed values to the underlying storage.voidsetAutoFlush(boolean flag) Sets the auto-flush property.toMap()Methods inherited from interface ch.tocco.nice2.toolbox.api.collection.ReadOnlyMap
containsKey, getBoolean, getBoolean, getDate, getDate, getDecimal, getDecimal, getDouble, getDouble, getEnum, getEnum, getFloat, getFloat, getInt, getInt, getLong, getLong, getString, getString, getValue, getValue, keySetMethods inherited from interface ch.tocco.nice2.toolbox.api.collection.WriteableMap
removeValue, setBoolean, setDate, setDecimal, setDouble, setEnum, setFloat, setInt, setLong, setString, setValue 
- 
Field Details
- 
KEY_FIELD
- See Also:
 
 - 
VALUE_FIELD
- See Also:
 
 - 
PATH_FIELD
- See Also:
 
 - 
PREF_ENTITY
- See Also:
 
 
 - 
 - 
Method Details
- 
getNode
Node getNode()The node identifying this preferences map. - 
setAutoFlush
void setAutoFlush(boolean flag) Sets the auto-flush property. If set totrue, each call to a setter will immediately cause saving all changed values.- Parameters:
 flag- autoflush
 - 
isAutoFlush
boolean isAutoFlush()- Returns:
 - whether 
autoflushmode is enabled or not 
 - 
save
void save()Saves all changed values to the underlying storage. - 
reload
void reload()Reloads all values from the storage. Note, that all changed values are lost. - 
clear
void clear()Clears the preferences map. If not flushed, any unsaved changes that happened before theclear()are discarded. All changes afterclear()are recorded as usual.- Specified by:
 clearin interfaceWriteableMap<String>
 - 
toMap
 
 -