Fix expansion state preference for details and suppData view
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / PreferencesUtil.java
index 5a077c2e491f548c902c60cd5a16259057a0f886..32eb38bb865af00d2758b4887a94910d4c527f22 100644 (file)
@@ -107,7 +107,7 @@ public class PreferencesUtil implements IPreferenceKeys {
                return TaxeditorStorePlugin.getDefault().getPreferenceStore();
        }
 
-       static String prefKey(String name) {
+       private static String prefKey(String name) {
            return name + "_"+  ((CdmRemoteSource)CdmStore.getActiveCdmSource()).toString();
        }
 
@@ -1986,4 +1986,13 @@ public static void setPreferencesToDB(List<CdmPreference> preferences) {
 
 
 
+    /**
+     * Returns whether the named preference is known.
+     * @param prefKey the key of the preference
+     * @return <code>true</code> if the preference is known, <code>false</code> otherwise
+     */
+    public static boolean contains(String prefKey){
+        return getPreferenceStore().contains(prefKey(prefKey));
+    }
+
 }