Package rs.baselib.prefs
Interface IPreferencesService
- All Known Implementing Classes:
AbstractPreferencesService
,PreferencesService
public interface IPreferencesService
The preference service.
- Author:
- ralph
-
Method Summary
Modifier and TypeMethodDescriptionvoid
flush
(IPreferences node) Flushes any changes made in this node.getReadLock
(IPreferences node) Returns the read lock object for the given node.getSystemPreferences
(String applicationName) Returns the system preferences for the given application.getSystemPreferencesHome
(String applicationName) Returns the home directory for system preferences of the given application.getUserPreferences
(String applicationName) Returns the user preferences for the given application.getUserPreferencesHome
(String applicationName) Returns the home directory for user preferences of the given application.getWriteLock
(IPreferences node) Returns the write lock object for the given node.void
sync
(IPreferences node) Wait for any modifications to be flushed.
-
Method Details
-
getUserPreferences
Returns the user preferences for the given application.- Parameters:
applicationName
- name of application- Returns:
- the preferences object
- Throws:
BackingStoreException
- when the storage fails
-
getSystemPreferences
Returns the system preferences for the given application.- Parameters:
applicationName
- name of application- Returns:
- the preferences object
- Throws:
BackingStoreException
- when the storage fails
-
flush
Flushes any changes made in this node. The method does not return before the flush has been completed.- Parameters:
node
- the node to be flushed- Throws:
BackingStoreException
- when there has been a communication problem with the backing store.
-
sync
Wait for any modifications to be flushed. The method does not return before the next flush has been completed (in case modifications are pending).- Parameters:
node
- the node to be flushed- Throws:
BackingStoreException
- when there has been a communication problem with the backing store.
-
getReadLock
Returns the read lock object for the given node.- Parameters:
node
- the node that requires a read lock- Returns:
- the responsible
Lock
object
-
getWriteLock
Returns the write lock object for the given node.- Parameters:
node
- the node that requires a write lock- Returns:
- the responsible
Lock
object
-
getUserPreferencesHome
Returns the home directory for user preferences of the given application.- Parameters:
applicationName
- name of application- Returns:
- user preferences home
-
getSystemPreferencesHome
Returns the home directory for system preferences of the given application.- Parameters:
applicationName
- name of application- Returns:
- system preferences home
-