ref #8263 Set term vocabulary DTO when fetching terms
authorPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 8 May 2019 11:28:40 +0000 (13:28 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 8 May 2019 11:28:50 +0000 (13:28 +0200)
 - temporary commit for hotfix which will be reverted in develop because
the cdmlib service method already sets the term vocabulary DTO

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermDtoContentProvider.java

index 6b32392db7a127f02b9cacbb2d4d7187c660f17b..6e08c0826da19d01c7620c0919d1d509efb1d0d6 100644 (file)
@@ -36,7 +36,10 @@ public class TermDtoContentProvider extends TreeNodeContentProvider {
        public Object[] getChildren(Object parentElement) {
            Collection<TermDto> 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());