Project

General

Profile

« Previous | Next » 

Revision 79bd864f

Added by Katja Luther over 4 years ago

ref #8389: revert disabling of allowOverride for default selection

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/SearchDialogAdminPreferences.java
29 29
        super.getValues();
30 30
        isAdminPreference = true;
31 31
        if(showIdInSelectionDialogPref != null){
32
            showIdInSelectionDialog = Boolean.parseBoolean(showIdInSelectionDialogPref.getValue());
32
            showIdInSelectionDialog = showIdInSelectionDialogPref.getValue() != null? Boolean.parseBoolean(showIdInSelectionDialogPref.getValue()): null;
33 33
        }else{
34 34
            showIdInSelectionDialog = null;
35 35
            showIdInSelectionDialogPref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.ShowIdInSelectionDialog, null);
36 36
        }
37 37
        if (searchForIdentifierAsDefaultPref != null){
38
            searchForIdentifierAsDefault = Boolean.parseBoolean(searchForIdentifierAsDefaultPref.getValue());
38
            searchForIdentifierAsDefault = searchForIdentifierAsDefaultPref.getValue() != null? Boolean.parseBoolean(searchForIdentifierAsDefaultPref.getValue()): null;
39 39
        }else{
40 40
            searchForIdentifierAsDefault = null;
41 41
            searchForIdentifierAsDefaultPref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.SearchForIdentifierAsDefault, null);
42 42
        }
43 43
        if (searchForIdentifierAndTitleCachePref != null){
44
            searchForIdentifierAndTitleCache = Boolean.parseBoolean(searchForIdentifierAndTitleCachePref.getValue());
44
            searchForIdentifierAndTitleCache = searchForIdentifierAndTitleCachePref.getValue() != null? Boolean.parseBoolean(searchForIdentifierAndTitleCachePref.getValue()): null;
45 45
        }else{
46 46
            searchForIdentifierAndTitleCache = null;
47 47
            searchForIdentifierAndTitleCachePref =CdmPreference.NewTaxEditorInstance(PreferencePredicate.SearchForIdentifierAndTitleCache, null);
48 48
        }
49 49
        if (sortTaxaByRankAndNamePref != null){
50
            sortTaxaByRankAndName = Boolean.parseBoolean(sortTaxaByRankAndNamePref.getValue());
50
            sortTaxaByRankAndName = sortTaxaByRankAndNamePref.getValue() != null? Boolean.parseBoolean(sortTaxaByRankAndNamePref.getValue()): null;
51 51
        }else{
52 52
            sortTaxaByRankAndName = null;
53 53
            sortTaxaByRankAndNamePref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.SortTaxaByRankAndName, null);
54 54
        }
55 55
        if (filterCommonNameReferencesPref != null){
56
            filterCommonNameReferences = Boolean.parseBoolean(filterCommonNameReferencesPref.getValue());
56
            filterCommonNameReferences = filterCommonNameReferencesPref.getValue() != null? Boolean.parseBoolean(filterCommonNameReferencesPref.getValue()): null;
57 57
        }else{
58 58
            filterCommonNameReferences = null;
59 59
            filterCommonNameReferencesPref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.CommonNameReferencesWithMarker, null);
......
70 70
            IPreferenceService service = controller.getPreferenceService();
71 71
            CdmPreference pref;
72 72
            if (showIdInSelectionDialog != null || !showIdInSelectionDialogPref.isAllowOverride()) {
73
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.ShowIdInSelectionDialog, showIdInSelectionDialog != null? showIdInSelectionDialog.toString():PreferencePredicate.ShowIdInSelectionDialog.getDefaultValue().toString());
73
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.ShowIdInSelectionDialog, showIdInSelectionDialog != null? showIdInSelectionDialog.toString():null);
74 74
                pref.setAllowOverride(showIdInSelectionDialogPref.isAllowOverride());
75 75
                service.set(pref);
76 76
            }else{
......
79 79

  
80 80

  
81 81
            if(searchForIdentifierAsDefault != null || !searchForIdentifierAsDefaultPref.isAllowOverride()){
82
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.SearchForIdentifierAsDefault, searchForIdentifierAsDefault!= null? searchForIdentifierAsDefault.toString():PreferencePredicate.SearchForIdentifierAsDefault.getDefaultValue().toString());
82
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.SearchForIdentifierAsDefault, searchForIdentifierAsDefault!= null? searchForIdentifierAsDefault.toString():null);
83 83
                pref.setAllowOverride(searchForIdentifierAsDefaultPref.isAllowOverride());
84 84
                service.set(pref);
85 85
            }else{
......
88 88

  
89 89

  
90 90
            if(searchForIdentifierAndTitleCache != null || !searchForIdentifierAndTitleCachePref.isAllowOverride()){
91
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.SearchForIdentifierAndTitleCache, searchForIdentifierAndTitleCache!= null? searchForIdentifierAndTitleCache.toString():PreferencePredicate.SearchForIdentifierAndTitleCache.getDefaultValue().toString());
91
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.SearchForIdentifierAndTitleCache, searchForIdentifierAndTitleCache!= null? searchForIdentifierAndTitleCache.toString():null);
92 92
                pref.setAllowOverride(searchForIdentifierAndTitleCachePref.isAllowOverride());
93 93
                service.set(pref);
94 94
            }else{
......
97 97

  
98 98
            if(sortTaxaByRankAndName != null || !sortTaxaByRankAndNamePref.isAllowOverride()){
99 99

  
100
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.SortTaxaByRankAndName, sortTaxaByRankAndName!= null? sortTaxaByRankAndName.toString():PreferencePredicate.SortTaxaByRankAndName.getDefaultValue().toString());
100
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.SortTaxaByRankAndName, sortTaxaByRankAndName!= null? sortTaxaByRankAndName.toString():null);
101 101
                pref.setAllowOverride(sortTaxaByRankAndNamePref.isAllowOverride());
102 102
                service.set(pref);
103 103
            }else{
......
107 107

  
108 108

  
109 109
            if(filterCommonNameReferences != null || !filterCommonNameReferencesPref.isAllowOverride()){
110
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.CommonNameReferencesWithMarker, filterCommonNameReferences!= null? filterCommonNameReferences.toString():PreferencePredicate.CommonNameReferencesWithMarker.getDefaultValue().toString());
110
                pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.CommonNameReferencesWithMarker, filterCommonNameReferences!= null? filterCommonNameReferences.toString():null);
111 111
                pref.setAllowOverride(filterCommonNameReferencesPref.isAllowOverride());
112 112
                service.set(pref);
113 113
            }else{

Also available in: Unified diff