BGBM BDI Projects
/
taxeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f02e08f
)
ref #8385: fix nomenclatural status page
author
Katja Luther
<k.luther@bgbm.org>
Mon, 26 Aug 2019 13:16:37 +0000
(15:16 +0200)
committer
Katja Luther
<k.luther@bgbm.org>
Mon, 26 Aug 2019 13:16:37 +0000
(15:16 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/NomenclaturalStatusTypeAdminPreference.java
patch
|
blob
|
history
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralTermPreference.java
patch
|
blob
|
history
diff --git
a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/NomenclaturalStatusTypeAdminPreference.java
b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/NomenclaturalStatusTypeAdminPreference.java
index a081e2ffb4ccf0fc10e71d9b3aca6d1eae4fe027..661e5fc493851a2614640093ec3f0c77ff1db69c 100755
(executable)
--- a/
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/NomenclaturalStatusTypeAdminPreference.java
+++ b/
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/NomenclaturalStatusTypeAdminPreference.java
@@
-14,14
+14,11
@@
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.StringUtils;
-import eu.etaxonomy.cdm.api.service.ITermService;
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
-import eu.etaxonomy.cdm.model.term.DefinedTermBase;
import eu.etaxonomy.cdm.persistence.dto.TermDto;
import eu.etaxonomy.taxeditor.preference.LocalOrDefaultEnum;
import eu.etaxonomy.taxeditor.preference.NomenclaturalStatusTypePreferences;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.cdm.persistence.dto.TermDto;
import eu.etaxonomy.taxeditor.preference.LocalOrDefaultEnum;
import eu.etaxonomy.taxeditor.preference.NomenclaturalStatusTypePreferences;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.CdmStore;
/**
* @author k.luther
/**
* @author k.luther
@@
-45,13
+42,14
@@
public class NomenclaturalStatusTypeAdminPreference extends NomenclaturalStatusT
}
Object[] checkedElements = treeComposite.getViewer().getCheckedElements();
}
Object[] checkedElements = treeComposite.getViewer().getCheckedElements();
+
List<UUID> listUIIDChecked = new ArrayList<>();
List<UUID> listUIIDChecked = new ArrayList<>();
- List<DefinedTermBase> preferredTerms = new ArrayList<>();
+
//
List<DefinedTermBase> preferredTerms = new ArrayList<>();
for (Object o : checkedElements) {
if(o instanceof TermDto){
TermDto termDto = (TermDto) o;
listUIIDChecked.add(termDto.getUuid());
for (Object o : checkedElements) {
if(o instanceof TermDto){
TermDto termDto = (TermDto) o;
listUIIDChecked.add(termDto.getUuid());
- preferredTerms.add(CdmStore.getService(ITermService.class).load(termDto.getUuid()));
+
//
preferredTerms.add(CdmStore.getService(ITermService.class).load(termDto.getUuid()));
}
}
String saveCheckedElements = StringUtils.join(listUIIDChecked, ";"); //$NON-NLS-1$
}
}
String saveCheckedElements = StringUtils.join(listUIIDChecked, ";"); //$NON-NLS-1$
diff --git
a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralTermPreference.java
b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralTermPreference.java
index 4dfe02c795bb132817c75c3e3f1924134d06cb02..b2399a1e34b833d85c745065ff4a798e350ca4dd 100755
(executable)
--- a/
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralTermPreference.java
+++ b/
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralTermPreference.java
@@
-232,6
+232,9
@@
abstract public class GeneralTermPreference extends CdmPreferencePage implements
pref = PreferencesUtil.getPreferenceFromDB(predicate);
this.allowOverride = pref!= null?pref.isAllowOverride():true;
this.isOverride = PreferencesUtil.getBooleanValue(PreferencesUtil.createOverridePreferenceString(predicate.getKey()));
pref = PreferencesUtil.getPreferenceFromDB(predicate);
this.allowOverride = pref!= null?pref.isAllowOverride():true;
this.isOverride = PreferencesUtil.getBooleanValue(PreferencesUtil.createOverridePreferenceString(predicate.getKey()));
+ if (pref == null){
+ pref = CdmPreference.NewTaxEditorInstance(predicate, null);
+ }
}
/**
}
/**
@@
-261,7
+264,7
@@
abstract public class GeneralTermPreference extends CdmPreferencePage implements
@Override
protected void performDefaults(){
@Override
protected void performDefaults(){
-
rememberCheckedValues("");
+ rememberCheckedValues("");
useLocalOrAdmin.select(0);
setApply(true);
useLocalOrAdmin.select(0);
setApply(true);