Revision 041937b4
Added by Katja Luther over 4 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditor.java | ||
---|---|---|
665 | 665 |
} |
666 | 666 |
|
667 | 667 |
|
668 |
String sortOrder = PreferencesUtil.getSortNamedAreasInDistributionEditor();
|
|
669 |
if (sortOrder.equals(TermOrder.Natural.getKey())){
|
|
668 |
TermOrder sortOrder = PreferencesUtil.getSortNamedAreasInDistributionEditor();
|
|
669 |
if (sortOrder.equals(TermOrder.Natural)){ |
|
670 | 670 |
areas = getTermsOrderedByVocabularyOrder(filteredList); |
671 |
} else if (sortOrder.equals(TermOrder.IdInVoc.getKey())){
|
|
671 |
} else if (sortOrder.equals(TermOrder.IdInVoc)){ |
|
672 | 672 |
areas = getTermsOrderedByIdInVocabulary(filteredList); |
673 | 673 |
}else{ |
674 | 674 |
areas = getTermsOrderedByLabels(filteredList, CdmStore.getDefaultLanguage()); |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/StatusHelper.java | ||
---|---|---|
29 | 29 |
this.term = term; |
30 | 30 |
TermDisplayEnum display; |
31 | 31 |
try{ |
32 |
display = TermDisplayEnum.byKey(PreferencesUtil.displayStatusInChecklistEditor());
|
|
32 |
display = PreferencesUtil.displayStatusInChecklistEditor();
|
|
33 | 33 |
}catch(IllegalArgumentException e){ |
34 | 34 |
display = TermDisplayEnum.Title; |
35 | 35 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/ChecklistEditorGeneralAdminPreference.java | ||
---|---|---|
16 | 16 |
import eu.etaxonomy.cdm.model.metadata.CdmPreference; |
17 | 17 |
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate; |
18 | 18 |
import eu.etaxonomy.cdm.model.metadata.PreferenceSubject; |
19 |
import eu.etaxonomy.cdm.model.metadata.TermComboEnum; |
|
20 |
import eu.etaxonomy.cdm.model.metadata.TermDisplayEnum; |
|
21 |
import eu.etaxonomy.cdm.model.metadata.TermOrder; |
|
19 | 22 |
import eu.etaxonomy.taxeditor.preference.ChecklistEditorGeneralPreference; |
20 | 23 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
21 | 24 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
... | ... | |
58 | 61 |
if(displayArea == null){ |
59 | 62 |
service.remove(CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.DisplayOfAreasInDistributionEditor)); |
60 | 63 |
}else{ |
61 |
pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.DisplayOfAreasInDistributionEditor, this.displayArea); |
|
64 |
pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.DisplayOfAreasInDistributionEditor, this.displayArea.getKey());
|
|
62 | 65 |
pref.setAllowOverride(allowOverrideAreaDisplayButton.getSelection()); |
63 | 66 |
service.set(pref); |
64 | 67 |
} |
... | ... | |
66 | 69 |
if (displayStatus == null){ |
67 | 70 |
service.remove(CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.DisplayOfStatus)); |
68 | 71 |
}else{ |
69 |
pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.DisplayOfStatus, this.displayStatus); |
|
72 |
pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.DisplayOfStatus, this.displayStatus.getKey());
|
|
70 | 73 |
pref.setAllowOverride(allowOverrideStatusDisplayButton.getSelection()); |
71 | 74 |
service.set(pref); |
72 | 75 |
} |
... | ... | |
81 | 84 |
if (orderAreas == null){ |
82 | 85 |
service.remove(CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.AreasSortedInDistributionEditor)); |
83 | 86 |
}else{ |
84 |
pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.AreasSortedInDistributionEditor, this.orderAreas); |
|
87 |
pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.AreasSortedInDistributionEditor, this.orderAreas.getKey());
|
|
85 | 88 |
pref.setAllowOverride(allowOverrideOrderAreasButton.getSelection()); |
86 | 89 |
service.set(pref); |
87 | 90 |
} |
... | ... | |
89 | 92 |
if (displayStatusCombo == null){ |
90 | 93 |
service.remove(CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.DisplayOfStatusInCombo)); |
91 | 94 |
}else{ |
92 |
pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.DisplayOfStatusInCombo, displayStatusCombo); |
|
95 |
pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.DisplayOfStatusInCombo, displayStatusCombo.getKey());
|
|
93 | 96 |
if (prefStatusDisplayInCombo == null){ |
94 | 97 |
prefStatusDisplayInCombo = pref; |
95 | 98 |
} |
... | ... | |
116 | 119 |
isAdminPreference = true; |
117 | 120 |
|
118 | 121 |
if (prefAreaDisplay != null){ |
119 |
this.displayArea = prefAreaDisplay.getValue();
|
|
122 |
this.displayArea = TermDisplayEnum.byKey(prefAreaDisplay.getValue());
|
|
120 | 123 |
}else{ |
121 | 124 |
this.displayArea = null; |
122 | 125 |
} |
123 | 126 |
|
124 | 127 |
|
125 | 128 |
if (prefStatusDisplay != null){ |
126 |
this.displayStatus = prefStatusDisplay.getValue();
|
|
129 |
this.displayStatus = TermDisplayEnum.byKey(prefStatusDisplay.getValue());
|
|
127 | 130 |
}else{ |
128 | 131 |
this.displayStatus = null; |
129 | 132 |
} |
130 | 133 |
|
131 | 134 |
if (prefStatusDisplayInCombo != null){ |
132 |
this.displayStatusCombo = prefStatusDisplayInCombo.getValue();
|
|
135 |
this.displayStatusCombo = TermComboEnum.byKey(prefStatusDisplayInCombo.getValue());
|
|
133 | 136 |
}else{ |
134 | 137 |
this.displayStatusCombo = null; |
135 | 138 |
} |
... | ... | |
137 | 140 |
|
138 | 141 |
if (prefAreaSort != null){ |
139 | 142 |
if (prefAreaSort.getValue() != null){ |
140 |
this.orderAreas = prefAreaSort.getValue().toString();
|
|
143 |
this.orderAreas = TermOrder.valueOf(prefAreaSort.getValue().toString());
|
|
141 | 144 |
}else{ |
142 | 145 |
this.orderAreas = null; |
143 | 146 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/NameDetailsViewAdminConfiguration.java | ||
---|---|---|
82 | 82 |
if (controller != null){ |
83 | 83 |
IPreferenceService service = controller.getPreferenceService(); |
84 | 84 |
PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.NameDetailsView); |
85 |
CdmPreference pref = service.find(key);
|
|
86 |
if (pref != null) {
|
|
87 |
isAllowOverride = pref.isAllowOverride();
|
|
85 |
nameDetailsPref = service.find(key);
|
|
86 |
if (nameDetailsPref != null) {
|
|
87 |
isAllowOverride = nameDetailsPref.isAllowOverride();
|
|
88 | 88 |
CdmPreferenceCache cache = CdmPreferenceCache.instance(); |
89 |
cache.put(pref);
|
|
89 |
cache.put(nameDetailsPref);
|
|
90 | 90 |
}else { |
91 | 91 |
isAllowOverride = true; |
92 | 92 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/NomenclaturalCodePreferences.java | ||
---|---|---|
129 | 129 |
List<NomenclaturalCode> supportedCodes = NomenclaturalCodeHelper |
130 | 130 |
.getSupportedCodes(); |
131 | 131 |
labelAndValues = new HashMap<>(); |
132 |
|
|
132 | 133 |
for (int i = 0; i < supportedCodes.size(); i++) { |
133 | 134 |
labelAndValues.put(supportedCodes.get(i), NomenclaturalCodeHelper |
134 | 135 |
.getDescription(supportedCodes.get(i))) ; |
... | ... | |
167 | 168 |
|
168 | 169 |
@Override |
169 | 170 |
protected void performDefaults() { |
170 |
actualCode = (NomenclaturalCode)PreferencePredicate.NomenclaturalCode.getDefaultValue();
|
|
171 |
actualCode = null;
|
|
171 | 172 |
allowOverride = true; |
172 | 173 |
Integer index = keyAndIndex.get(actualCode); |
173 | 174 |
if(index!=null){ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java | ||
---|---|---|
42 | 42 |
protected boolean overrideActivated; |
43 | 43 |
boolean isUseLocal; |
44 | 44 |
protected Boolean isShowRank; |
45 |
protected String orderAreas;
|
|
46 |
protected String displayStatus;
|
|
47 |
protected String displayStatusCombo;
|
|
48 |
protected String displayArea;
|
|
45 |
protected TermOrder orderAreas;
|
|
46 |
protected TermDisplayEnum displayStatus;
|
|
47 |
protected TermComboEnum displayStatusCombo;
|
|
48 |
protected TermDisplayEnum displayArea;
|
|
49 | 49 |
protected Boolean ownDescriptionForDistributionEditor; |
50 | 50 |
|
51 | 51 |
protected boolean overrideOwnDescriptionForDistributionEditor; |
... | ... | |
201 | 201 |
areaOrderSelectionCombo.select(index); |
202 | 202 |
break; |
203 | 203 |
} |
204 |
if (itemLabel.startsWith(orderAreas)) {
|
|
204 |
if (itemLabel.equals(orderAreas.getLabel())) {
|
|
205 | 205 |
areaOrderSelectionCombo.select(index); |
206 | 206 |
break; |
207 | 207 |
} |
... | ... | |
237 | 237 |
if (itemLabel.startsWith(Messages.Preference_Use_Default) && displayArea == null){ |
238 | 238 |
areaDisplaySelectionCombo.select(index); |
239 | 239 |
break; |
240 |
}else if (itemLabel.startsWith(displayArea)) {
|
|
240 |
}else if (itemLabel.equals(displayArea.getLabel())) {
|
|
241 | 241 |
areaDisplaySelectionCombo.select(index); |
242 | 242 |
break; |
243 | 243 |
} |
... | ... | |
270 | 270 |
statusDisplaySelectionCombo.select(index); |
271 | 271 |
break; |
272 | 272 |
} |
273 |
if (itemLabel.startsWith(displayStatus)) {
|
|
273 |
if (itemLabel.equals(displayStatus.getLabel())) {
|
|
274 | 274 |
statusDisplaySelectionCombo.select(index); |
275 | 275 |
break; |
276 | 276 |
} |
... | ... | |
304 | 304 |
statusDisplayInComboSelectionCombo.select(index); |
305 | 305 |
break; |
306 | 306 |
} |
307 |
if (itemLabel.startsWith(displayStatus)) {
|
|
307 |
if (itemLabel.equals(displayStatusCombo.getLabel())) {
|
|
308 | 308 |
statusDisplayInComboSelectionCombo.select(index); |
309 | 309 |
break; |
310 | 310 |
} |
... | ... | |
381 | 381 |
override = false; |
382 | 382 |
if (orderAreas != null ) { |
383 | 383 |
override = true; |
384 |
PreferencesUtil.setSortNamedAreasInDistributionEditor(orderAreas); |
|
384 |
PreferencesUtil.setSortNamedAreasInDistributionEditor(orderAreas.getKey());
|
|
385 | 385 |
} |
386 | 386 |
PreferencesUtil.setBooleanValue( |
387 | 387 |
PreferencesUtil.prefOverrideKey(PreferencePredicate.AreasSortedInDistributionEditor.getKey()), |
... | ... | |
404 | 404 |
override = false; |
405 | 405 |
if (displayStatus != null) { |
406 | 406 |
override = true; |
407 |
PreferencesUtil.setDisplayStatusInChecklistEditor(displayStatus); |
|
407 |
PreferencesUtil.setDisplayStatusInChecklistEditor(displayStatus.getKey());
|
|
408 | 408 |
} |
409 | 409 |
PreferencesUtil.setBooleanValue( |
410 | 410 |
PreferencesUtil.prefOverrideKey(PreferencePredicate.DisplayOfStatus.getKey()), |
... | ... | |
413 | 413 |
override = false; |
414 | 414 |
if (displayStatusCombo != null) { |
415 | 415 |
override = true; |
416 |
PreferencesUtil.setStringValue(PreferencePredicate.DisplayOfStatusInCombo.getKey(), displayStatusCombo); |
|
416 |
PreferencesUtil.setStringValue(PreferencePredicate.DisplayOfStatusInCombo.getKey(), displayStatusCombo.getKey());
|
|
417 | 417 |
} |
418 | 418 |
PreferencesUtil.setBooleanValue( |
419 | 419 |
PreferencesUtil.prefOverrideKey(PreferencePredicate.DisplayOfStatusInCombo.getKey()), |
... | ... | |
424 | 424 |
override = false; |
425 | 425 |
if (displayArea != null) { |
426 | 426 |
override = true; |
427 |
PreferencesUtil.setAreaDisplayInChecklistEditor(displayArea); |
|
427 |
PreferencesUtil.setAreaDisplayInChecklistEditor(displayArea.getKey());
|
|
428 | 428 |
} |
429 | 429 |
PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey( |
430 | 430 |
PreferencePredicate.DisplayOfAreasInDistributionEditor.getKey()), override); |
... | ... | |
451 | 451 |
if (e.getSource().equals(statusDisplaySelectionCombo)) { |
452 | 452 |
String text = statusDisplaySelectionCombo.getText(); |
453 | 453 |
if(text.startsWith(Messages.Preference_Use_Default)){ |
454 |
displayStatus = Messages.Preference_Use_Default;
|
|
454 |
displayStatus = null;
|
|
455 | 455 |
if(isAdminPreference){ |
456 | 456 |
prefStatusDisplay.setAllowOverride(true); |
457 | 457 |
allowOverrideStatusDisplayButton.setSelection(true); |
... | ... | |
461 | 461 |
} |
462 | 462 |
for (TermDisplayEnum display : TermDisplayEnum.values()) { |
463 | 463 |
if (text.startsWith(display.getLabel())) { |
464 |
displayStatus = display.getKey();
|
|
464 |
displayStatus = display; |
|
465 | 465 |
break; |
466 | 466 |
} |
467 | 467 |
|
... | ... | |
480 | 480 |
} |
481 | 481 |
for (TermComboEnum display : TermComboEnum.values()) { |
482 | 482 |
if (text.startsWith(display.getLabel())) { |
483 |
displayStatusCombo = display.getKey();
|
|
483 |
displayStatusCombo = display; |
|
484 | 484 |
break; |
485 | 485 |
} |
486 | 486 |
|
... | ... | |
498 | 498 |
} |
499 | 499 |
for (TermDisplayEnum display : TermDisplayEnum.values()) { |
500 | 500 |
if (text.startsWith(display.getLabel())) { |
501 |
displayArea = display.getKey();
|
|
501 |
displayArea = display; |
|
502 | 502 |
break; |
503 | 503 |
} |
504 | 504 |
} |
... | ... | |
506 | 506 |
if (e.getSource().equals(areaOrderSelectionCombo)) { |
507 | 507 |
String text = areaOrderSelectionCombo.getText(); |
508 | 508 |
if(text.startsWith(Messages.Preference_Use_Default)){ |
509 |
orderAreas = Messages.Preference_Use_Default;
|
|
509 |
orderAreas = null;
|
|
510 | 510 |
if (isAdminPreference){ |
511 | 511 |
prefAreaSort.setAllowOverride(true); |
512 | 512 |
allowOverrideOrderAreasButton.setSelection(true); |
... | ... | |
515 | 515 |
} |
516 | 516 |
for (TermOrder display : TermOrder.values()) { |
517 | 517 |
if (text.startsWith(display.getLabel())) { |
518 |
orderAreas = display.getKey();
|
|
518 |
orderAreas = display; |
|
519 | 519 |
break; |
520 | 520 |
} |
521 | 521 |
} |
... | ... | |
613 | 613 |
if (overrideActivated) { |
614 | 614 |
displayArea = PreferencesUtil.displayAreaInChecklistEditor(); |
615 | 615 |
}else{ |
616 |
displayArea = Messages.Preference_Use_Default;
|
|
616 |
displayArea = null;
|
|
617 | 617 |
} |
618 | 618 |
} else { |
619 |
displayArea = prefAreaDisplay.getValue();
|
|
619 |
displayArea = TermDisplayEnum.byKey(prefAreaDisplay.getValue());
|
|
620 | 620 |
} |
621 | 621 |
} else { |
622 | 622 |
if (overrideAreaDisplay){ |
623 | 623 |
displayArea = PreferencesUtil.displayAreaInChecklistEditor(); |
624 | 624 |
} else{ |
625 |
displayArea = Messages.Preference_Use_Default;
|
|
625 |
displayArea = null;
|
|
626 | 626 |
} |
627 | 627 |
//prefAreaDisplay = CdmPreference.NewTaxEditorInstance(PreferencePredicate.DisplayOfAreasInDistributionEditor, PreferencePredicate.DisplayOfAreasInDistributionEditor.getDefaultValue() != null ? PreferencePredicate.DisplayOfAreasInDistributionEditor.getDefaultValue().toString(): null); |
628 | 628 |
} |
... | ... | |
636 | 636 |
if (overrideStatusDisplay) { |
637 | 637 |
displayStatus = PreferencesUtil.displayStatusInChecklistEditor(); |
638 | 638 |
}else{ |
639 |
displayStatus = Messages.Preference_Use_Default;
|
|
639 |
displayStatus = null;
|
|
640 | 640 |
} |
641 | 641 |
} else { |
642 |
this.displayStatus = prefStatusDisplay.getValue();
|
|
642 |
this.displayStatus = TermDisplayEnum.byKey(prefStatusDisplay.getValue());
|
|
643 | 643 |
} |
644 | 644 |
} else { |
645 | 645 |
if (overrideStatusDisplay){ |
646 | 646 |
displayStatus = PreferencesUtil.displayStatusInChecklistEditor(); |
647 | 647 |
} else{ |
648 |
displayStatus = Messages.Preference_Use_Default;
|
|
648 |
displayStatus = null;
|
|
649 | 649 |
} |
650 | 650 |
//prefStatusDisplay = CdmPreference.NewTaxEditorInstance(PreferencePredicate.DisplayOfStatus, PreferencePredicate.DisplayOfStatus.getDefaultValue() != null ? PreferencePredicate.DisplayOfStatus.getDefaultValue().toString(): null); |
651 | 651 |
} |
... | ... | |
657 | 657 |
if (prefStatusDisplayInCombo != null) { |
658 | 658 |
if (prefStatusDisplayInCombo.isAllowOverride()){ |
659 | 659 |
if (overrideStatusDisplayCombo) { |
660 |
displayStatusCombo = PreferencesUtil.getStringValue(PreferencePredicate.DisplayOfStatusInCombo.getKey());
|
|
660 |
displayStatusCombo = TermComboEnum.byKey(PreferencesUtil.getStringValue(PreferencePredicate.DisplayOfStatusInCombo.getKey()));
|
|
661 | 661 |
}else{ |
662 |
displayStatusCombo = Messages.Preference_Use_Default;
|
|
662 |
displayStatusCombo = null;
|
|
663 | 663 |
} |
664 | 664 |
} else { |
665 |
this.displayStatusCombo = prefStatusDisplayInCombo.getValue();
|
|
665 |
this.displayStatusCombo = TermComboEnum.byKey(prefStatusDisplayInCombo.getValue());
|
|
666 | 666 |
} |
667 | 667 |
} else { |
668 | 668 |
if (overrideStatusDisplayCombo){ |
669 |
displayStatusCombo = PreferencesUtil.getStringValue(PreferencePredicate.DisplayOfStatusInCombo.getKey());
|
|
669 |
displayStatusCombo = TermComboEnum.byKey(PreferencesUtil.getStringValue(PreferencePredicate.DisplayOfStatusInCombo.getKey()));
|
|
670 | 670 |
} else{ |
671 |
displayStatusCombo = Messages.Preference_Use_Default;
|
|
671 |
displayStatusCombo = null;
|
|
672 | 672 |
} |
673 | 673 |
|
674 | 674 |
} |
... | ... | |
683 | 683 |
if(overrideOrderAreas) { |
684 | 684 |
orderAreas = PreferencesUtil.getSortNamedAreasInDistributionEditor(); |
685 | 685 |
}else{ |
686 |
orderAreas = Messages.Preference_Use_Default;
|
|
686 |
orderAreas = null;
|
|
687 | 687 |
} |
688 | 688 |
} else { |
689 | 689 |
if (prefAreaSort.getValue() != null) { |
690 |
orderAreas = prefAreaSort.getValue().toString();
|
|
690 |
orderAreas = TermOrder.valueOf(prefAreaSort.getValue().toString());
|
|
691 | 691 |
} else { |
692 |
orderAreas = ((TermOrder) PreferencePredicate.AreasSortedInDistributionEditor.getDefaultValue()) |
|
693 |
.getKey(); |
|
692 |
orderAreas = ((TermOrder) PreferencePredicate.AreasSortedInDistributionEditor.getDefaultValue()); |
|
694 | 693 |
} |
695 | 694 |
|
696 | 695 |
} |
... | ... | |
698 | 697 |
if (overrideOrderAreas){ |
699 | 698 |
orderAreas = PreferencesUtil.getSortNamedAreasInDistributionEditor(); |
700 | 699 |
}else{ |
701 |
orderAreas = Messages.Preference_Use_Default;
|
|
700 |
orderAreas = null;
|
|
702 | 701 |
} |
703 | 702 |
//prefAreaSort = CdmPreference.NewTaxEditorInstance(PreferencePredicate.AreasSortedInDistributionEditor, PreferencePredicate.AreasSortedInDistributionEditor.getDefaultValue() != null ? PreferencePredicate.AreasSortedInDistributionEditor.getDefaultValue().toString(): null); |
704 | 703 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsConfigurator.java | ||
---|---|---|
182 | 182 |
result.append(":"); |
183 | 183 |
result.append(this.isSecDetailsActivated); |
184 | 184 |
result.append(";"); |
185 |
|
|
185 |
result.append("nameCache"); |
|
186 |
result.append(":"); |
|
187 |
result.append(this.isNameCacheActivated); |
|
188 |
result.append(";"); |
|
186 | 189 |
result.append("lsid"); |
187 | 190 |
result.append(":"); |
188 | 191 |
result.append(this.isLSIDActivated()); |
... | ... | |
207 | 210 |
result.append(":"); |
208 | 211 |
result.append(this.isAuthorshipSectionActivated()); |
209 | 212 |
result.append(";"); |
213 |
result.append("authorCache"); |
|
214 |
result.append(":"); |
|
215 |
result.append(this.isAuthorCacheActivated()); |
|
216 |
result.append(";"); |
|
210 | 217 |
result.append("atomisedEpithets"); |
211 | 218 |
result.append(":"); |
212 | 219 |
result.append(this.isAtomisedEpithetsActivated()); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsViewConfiguration.java | ||
---|---|---|
36 | 36 |
protected NameDetailsConfigurator nameDetailsConfig; |
37 | 37 |
Composite localSettings ; |
38 | 38 |
|
39 |
CdmPreference nameDetailsPref; |
|
39 |
protected CdmPreference nameDetailsPref;
|
|
40 | 40 |
|
41 | 41 |
protected boolean isShowTaxon; |
42 | 42 |
protected boolean isShowNameApprobiation ; |
... | ... | |
448 | 448 |
protected void setButtonSelections(){ |
449 | 449 |
|
450 | 450 |
int index = 0; |
451 |
if (isSimpleDetailsViewActivated != null && isOverride){
|
|
451 |
if (isSimpleDetailsViewActivated != null && (isOverride || isAdminPreference)){
|
|
452 | 452 |
if (isSimpleDetailsViewActivated){ |
453 | 453 |
index = 1; |
454 | 454 |
}else{ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java | ||
---|---|---|
59 | 59 |
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate; |
60 | 60 |
import eu.etaxonomy.cdm.model.metadata.PreferenceSubject; |
61 | 61 |
import eu.etaxonomy.cdm.model.metadata.TermDisplayEnum; |
62 |
import eu.etaxonomy.cdm.model.metadata.TermOrder; |
|
62 | 63 |
import eu.etaxonomy.cdm.model.name.NomenclaturalCode; |
63 | 64 |
import eu.etaxonomy.cdm.model.term.IDefinedTerm; |
64 | 65 |
import eu.etaxonomy.cdm.model.term.ISimpleTerm; |
... | ... | |
1289 | 1290 |
return getBooleanValue(PreferencePredicate.OwnDescriptionForDistributionEditor.getKey()); |
1290 | 1291 |
} |
1291 | 1292 |
|
1292 |
public static String displayAreaInChecklistEditor() { |
|
1293 |
String result = getStringValue(PreferencePredicate.DisplayOfAreasInDistributionEditor.getKey()); |
|
1294 |
if (StringUtils.isBlank(result)){ |
|
1295 |
return ((TermDisplayEnum) PreferencePredicate.DisplayOfAreasInDistributionEditor.getDefaultValue()).getKey(); |
|
1293 |
public static TermDisplayEnum displayAreaInChecklistEditor() { |
|
1294 |
TermDisplayEnum result; |
|
1295 |
try{ |
|
1296 |
result = TermDisplayEnum.byKey(getStringValue(PreferencePredicate.DisplayOfAreasInDistributionEditor.getKey())); |
|
1297 |
}catch (IllegalArgumentException e){ |
|
1298 |
result = ((TermDisplayEnum) PreferencePredicate.DisplayOfAreasInDistributionEditor.getDefaultValue()); |
|
1296 | 1299 |
} |
1297 | 1300 |
return result; |
1298 | 1301 |
} |
1299 | 1302 |
|
1300 |
public static String displayStatusInChecklistEditor() { |
|
1301 |
String result = getStringValue(PreferencePredicate.DisplayOfStatus.getKey()); |
|
1302 |
if (StringUtils.isBlank(result)){ |
|
1303 |
return((TermDisplayEnum) PreferencePredicate.DisplayOfStatus.getDefaultValue()).getKey(); |
|
1303 |
public static TermDisplayEnum displayStatusInChecklistEditor() { |
|
1304 |
TermDisplayEnum result; |
|
1305 |
try{ |
|
1306 |
result = TermDisplayEnum.byKey(getStringValue(PreferencePredicate.DisplayOfStatus.getKey())); |
|
1307 |
}catch (IllegalArgumentException e){ |
|
1308 |
result = ((TermDisplayEnum) PreferencePredicate.DisplayOfStatus.getDefaultValue()); |
|
1304 | 1309 |
} |
1305 | 1310 |
return result; |
1306 | 1311 |
} |
... | ... | |
1352 | 1357 |
config.setNomenclaturalCodeActived(getValue(sectionMap, "nc")); |
1353 | 1358 |
config.setAppendedPhraseActivated(getValue(sectionMap, "ap")); |
1354 | 1359 |
config.setRankActivated(getValue(sectionMap, "rank")); |
1360 |
config.setNameCacheActivated(getValue(sectionMap, "nameCache")); |
|
1355 | 1361 |
config.setAtomisedEpithetsActivated(getValue(sectionMap, "atomisedEpithets")); |
1356 | 1362 |
config.setAuthorshipSectionActivated(getValue(sectionMap,"author")); |
1363 |
config.setAuthorCacheActivated(getValue(sectionMap, "authorCache")); |
|
1357 | 1364 |
config.setNomenclaturalReferenceSectionActivated(sectionMap.get("nomRef")); |
1358 | 1365 |
config.setNomenclaturalStatusSectionActivated(getValue(sectionMap, "nomStat")); |
1359 | 1366 |
config.setProtologueActivated(getValue(sectionMap,"protologue")); |
1360 | 1367 |
config.setTypeDesignationSectionActivated(getValue(sectionMap,"typeDes")); |
1361 | 1368 |
config.setNameRelationsSectionActivated(getValue(sectionMap,"nameRelation")); |
1362 | 1369 |
config.setHybridActivated(getValue(sectionMap,"hybrid")); |
1370 |
config.setNameApprobiationActivated(getValue(sectionMap, "nameApproviation")); |
|
1363 | 1371 |
} |
1364 | 1372 |
return config; |
1365 | 1373 |
} |
... | ... | |
1556 | 1564 |
return getBooleanValue(IPreferenceKeys.SORT_TAXA_BY_RANK_AND_NAME); |
1557 | 1565 |
} |
1558 | 1566 |
|
1559 |
public static String getSortNamedAreasInDistributionEditor() { |
|
1560 |
|
|
1561 |
return getStringValue(PreferencePredicate.AreasSortedInDistributionEditor.getKey()); |
|
1567 |
public static TermOrder getSortNamedAreasInDistributionEditor() { |
|
1568 |
TermOrder result; |
|
1569 |
try{ |
|
1570 |
result = TermOrder.valueOf(getStringValue(PreferencePredicate.AreasSortedInDistributionEditor.getKey())); |
|
1571 |
}catch (IllegalArgumentException e){ |
|
1572 |
result = (TermOrder)PreferencePredicate.AreasSortedInDistributionEditor.getDefaultValue(); |
|
1573 |
} |
|
1574 |
return result; |
|
1562 | 1575 |
} |
1563 | 1576 |
|
1564 | 1577 |
public static void setSortNamedAreasInDistributionEditor(String isSortByVocabularyOrder) { |
Also available in: Unified diff
ref #8385: fix problems in preferences