-
Sub-task
-
Resolution: Done
-
Major
-
0.9.0.Final
-
None
-
None
-
NEW
-
NEW
The idea is to have a server API to manage preferences, with flexible scope hierarchy.
A scope consists in a "type" (i.e.: global, user) and a "key" (i.e.: global, username).
A scope hierarchy consists in a scope order, used to find a preference value; when a value is searched, the first scope of this order to have the preference defined is used.
API details:
- First, a preferences storage service (PreferenceStorage) is responsible for plain I/O operations in a specific repository (preferences.git). To write (create/edit) a preference, a scope must be provided. To read (search) a preference(s), a scope or a scope resolution strategy must be provided.
- Second, a preferences store service (PreferenceStore) is responsible for providing a API to put, get, search and delete preferences, in a scoped manner.
- The scopes are totally flexible, but a default implementation (user and global scopes) will be provided by uberfire, if none is defined.