Revision 69213a6e
Added by Katja Luther about 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java | ||
---|---|---|
429 | 429 |
} |
430 | 430 |
Float result = null; |
431 | 431 |
try{ |
432 |
result = Float.parseFloat(prefValue); |
|
432 |
if (prefValue != null){ |
|
433 |
result = Float.parseFloat(prefValue); |
|
434 |
} |
|
433 | 435 |
}catch(NumberFormatException e){ |
434 | 436 |
logger.debug("Preference value of " + name + " is not a number"); |
435 | 437 |
} |
... | ... | |
943 | 945 |
*/ |
944 | 946 |
public static void setDefaults() { |
945 | 947 |
|
946 |
getPreferenceStore().setDefault(createPreferenceString(EDIT_MAP_SERVICE_ACCES_POINT),
|
|
948 |
getPreferenceStore().setDefault(createPreferenceString(PreferencePredicate.EditMapServiceAccessPoint.getKey()),
|
|
947 | 949 |
"http://edit.africamuseum.be/edit_wp5/v1.2/rest_gen.php"); |
948 | 950 |
//FIXME : changed default for SHOULD_CONNECT_AT_STARTUP to false (ticket 3828) until resolution |
949 | 951 |
getPreferenceStore().setDefault(createPreferenceString(SHOULD_CONNECT_AT_STARTUP), false); |
... | ... | |
1035 | 1037 |
} |
1036 | 1038 |
|
1037 | 1039 |
public static String getMapServiceAccessPoint() { |
1038 |
return getStringValue(EDIT_MAP_SERVICE_ACCES_POINT);
|
|
1040 |
return getStringValue(PreferencePredicate.EditMapServiceAccessPoint.getKey());
|
|
1039 | 1041 |
} |
1040 | 1042 |
|
1041 | 1043 |
public static boolean shouldConnectAtStartUp() { |
... | ... | |
1067 | 1069 |
} |
1068 | 1070 |
|
1069 | 1071 |
public static void setSortRanksHierarchichally(boolean selection) { |
1070 |
setBooleanValue(SORT_RANKS_HIERARCHICHALLY, selection);
|
|
1072 |
setBooleanValue(PreferencePredicate.SortRanksHierarchichally.getKey(), selection);
|
|
1071 | 1073 |
} |
1072 | 1074 |
|
1073 | 1075 |
public static boolean getSortRanksHierarchichally() { |
1074 |
return getBooleanValue(SORT_RANKS_HIERARCHICHALLY);
|
|
1076 |
return getBooleanValue(PreferencePredicate.SortRanksHierarchichally.getKey());
|
|
1075 | 1077 |
} |
1076 | 1078 |
|
1077 | 1079 |
public static boolean isMultilanguageTextEditingCapability() { |
1078 | 1080 |
return getBooleanValue( |
1079 |
MULTILANGUAGE_TEXT_EDITING_CAPABILITY);
|
|
1081 |
PreferencePredicate.MultiLanguageTextEditing.getKey());
|
|
1080 | 1082 |
} |
1081 | 1083 |
|
1082 | 1084 |
public static Language getGlobalLanguage() { |
... | ... | |
1880 | 1882 |
|
1881 | 1883 |
} |
1882 | 1884 |
|
1885 |
|
|
1886 |
public static void removeFromDB(CdmPreference prefToDelete) { |
|
1887 |
ICdmRepository controller; |
|
1888 |
|
|
1889 |
if(CdmStore.isActive()){ |
|
1890 |
controller = CdmStore.getCurrentApplicationConfiguration(); |
|
1891 |
controller.getPreferenceService().remove(prefToDelete.getKey()); |
|
1892 |
|
|
1893 |
CdmPreferenceCache.instance().getAllTaxEditorDBPreferences(); |
|
1894 |
} |
|
1895 |
|
|
1896 |
} |
|
1883 | 1897 |
/** |
1884 | 1898 |
* @return |
1885 | 1899 |
*/ |
Also available in: Unified diff
ref #8562: add admin preference page for multilanguage support