Module com.gluonhq.attach.settings
Package com.gluonhq.attach.settings.impl
Class DesktopSettingsService
- java.lang.Object
-
- com.gluonhq.attach.settings.impl.DesktopSettingsService
-
- All Implemented Interfaces:
SettingsService
public class DesktopSettingsService extends java.lang.Object implements SettingsService
An implementation of SettingService that stores all settings in a Properties file on the local file system.
-
-
Constructor Summary
Constructors Constructor Description DesktopSettingsService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidremove(java.lang.String key)Removes the setting for the specified key.java.lang.Stringretrieve(java.lang.String key)Retrieves the value of the setting that is identified by the specified key.voidstore(java.lang.String key, java.lang.String value)Stores the setting with the specified key and value.
-
-
-
Method Detail
-
store
public void store(java.lang.String key, java.lang.String value)Description copied from interface:SettingsServiceStores the setting with the specified key and value. If a setting with the specified key exists, the value for that setting will be overwritten with the specified value.- Specified by:
storein interfaceSettingsService- Parameters:
key- a key that uniquely identifies the settingvalue- the value associated with the key
-
remove
public void remove(java.lang.String key)
Description copied from interface:SettingsServiceRemoves the setting for the specified key.- Specified by:
removein interfaceSettingsService- Parameters:
key- the key of the setting that needs to be removed
-
retrieve
public java.lang.String retrieve(java.lang.String key)
Description copied from interface:SettingsServiceRetrieves the value of the setting that is identified by the specified key.- Specified by:
retrievein interfaceSettingsService- Parameters:
key- the key of the setting to look up- Returns:
- the value associated with the setting or
nullwhen no setting was stored with the specified key
-
-