|Re: [neon] How to replace org.osgi.service.prefs.Preferences [message #1752497 is a reply to message #1752490]
||Tue, 24 January 2017 13:55
| Urs Beeli
Registered: October 2012
Location: Bern, Switzerland
Hm, it seems my elation was premature.|
In Mars we had the following structure:
MyPreferences extends org.eclipse.scout.commons.prefs.AbstractPreferences implements org.osgi.service.prefs.Preferences
I'm trying to map things to Neon but am struggling. For starters, there seem to be two different classes called Preferences and I am not sure which one to use
java.util.prefs.AbstractPreferences extends java.util.prefs.Preferences
But then, there also is:
Which of the two should I use instead of org.osgi.service.prefs.Preferences?
java.util.prefs.AbstractPreferences extends java.util.prefs.Preferences, so that led me to think that this is the choice.
However, then, there is org.eclipse.scout.rt.shared.services.common.prefs.IUserPreferencesStorageService which in Mars used org.osgi.service.prefs.Preferences loadPreferences().
In Neon this seems to have been replaced with org.eclipse.scout.rt.shared.services.common.prefs.IUserPreferencesStorageService which instead has org.eclipse.scout.rt.shared.services.common.prefs.IPreferences getPreferences(). This interface however is implemented by org.eclipse.scout.rt.shared.services.common.prefs.Preferences which seems to suggest to the exact opposite.
Besides this confusion, I am not sure how I need to transfer the former loadPreferences() to the new getPreferences() which has parameters the old method lacked. Also, the Preferences now seem to require some kind of tree form instead of just key/value pairs.
Is there any documentation how we can implement our own preference store using the new Neon mechanisms?
[Updated on: Tue, 24 January 2017 14:05]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03904 seconds