THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
interface PreferenceStore { // see below for the Updater and Recoverer interfaces void Collection<PreferenceRecords> openopenAndLoad(PreferenceStoreUpdater updater, PreferenceStoreRecoverer recoverer); // safely persist all state and close all resources void close(); // adds preferences to the store void create(Collection<PreferenceRecord> preferences); // updates existing preferences. throws an exception if preference with given id is not already in the store void update(Collection<PreferenceRecord> preferences); // updates existing preferences. if a preference with given id is not already in the store it will be added void updateOrCreate(Collection<PreferenceRecord> preferences); // remove preferences from the store. throws an exception if preference with given id is not already in the store void delete(Collection<PreferenceRecord> preferences); } interface PreferenceRecord { UUID getId(); Map<String, Object> getAttributes(); } |
...
- Convert PreferenceRecord to Preference
- Attach Preference to AbstractConfiguredObject
- Convert generic attributes to a type specific PreferenceValue
- Cross link to other preferences
Code Block | ||
---|---|---|
| ||
interface PreferenceStoreUpdater { Collection<PreferenceRecord> updatePreferences(String currentVersion, Collection<PreferenceRecord> preferences); String getLatestVersion(); } interface PreferenceStoreRecoverer { void recoverPreferences(Collection<PreferenceRecord> preferences); } |
...