From: Patrick Plitzner Date: Wed, 8 May 2019 11:28:40 +0000 (+0200) Subject: ref #8263 Set term vocabulary DTO when fetching terms X-Git-Tag: 5.8.0^2~86 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/a9f5e4932d7f9f2b149dd10807935e79f25adf16 ref #8263 Set term vocabulary DTO when fetching terms - temporary commit for hotfix which will be reverted in develop because the cdmlib service method already sets the term vocabulary DTO --- diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermDtoContentProvider.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermDtoContentProvider.java index 6b32392db..6e08c0826 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermDtoContentProvider.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermDtoContentProvider.java @@ -36,7 +36,10 @@ public class TermDtoContentProvider extends TreeNodeContentProvider { public Object[] getChildren(Object parentElement) { Collection children = new HashSet<>(); if(parentElement instanceof TermVocabularyDto){ - children.addAll(CdmStore.getService(IVocabularyService.class).getCompleteTermHierarchy((TermVocabularyDto)parentElement)); + children.addAll(CdmStore.getService(IVocabularyService.class).getCompleteTermHierarchy(((TermVocabularyDto)parentElement).getUuid())); + // FIXME this is only temporarily done on the taxeditor side for the hotfix + // the cdmlib service method already sets the vocabulary DTO but cdmlib is not released with this hotfix + children.forEach(child->child.setVocabularyDto((TermVocabularyDto) parentElement)); } else if(parentElement instanceof TermDto){ if(((TermDto) parentElement).getIncludes()!=null){ children.addAll(((TermDto) parentElement).getIncludes());