ref #8677: add distribution aggregation as long running task to editor
authorKatja Luther <k.luther@bgbm.org>
Tue, 26 Nov 2019 11:10:00 +0000 (12:10 +0100)
committerKatja Luther <k.luther@bgbm.org>
Tue, 26 Nov 2019 11:10:51 +0000 (12:10 +0100)
14 files changed:
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/bundle.properties
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/bundle_de.properties
eu.etaxonomy.taxeditor.navigation/fragment.e4xmi
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/AggregateDistributionForSubTreeHandler.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AbstractTermSelectionWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AvailableDistributionPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/SuperAreaSelectionWizard.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/DistributionAggregationConfiguratorWizard.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/DistributionAggregationWizardPage.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/PublishSubTreeConfiguratorWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/SetSecundumConfiguratorWizardPage.java

index f5b688785529c435acf67b314ae0720c66f0b7d1..f9a64d4269275db352ed1c6575b46290ef03aba0 100644 (file)
@@ -94,3 +94,4 @@ command.commandname.1 = Clone Classification
 command.commandname.2 = Refresh Navigator\r
 command.commandname.3 = Link with taxon\r
 \r
+command.name.aggregateDistributionForSubtree = Aggregate distributions\r
index 976ce378dbc9c56a20c5cef6b92c45865daaddd4..212bdd5c77a242a1062eaf6b84c1f77f9ae19379 100644 (file)
@@ -93,4 +93,6 @@ handledtoolitem.label.1 = Collapse
 handledtoolitem.label.2 = Sync with taxon selectio\r
 command.commandname.1 = Klassifikation duplizieren\r
 command.commandname.2 = Navigator aktualisieren\r
-command.commandname.3 = Mit Taxon verknüpfen
\ No newline at end of file
+command.commandname.3 = Mit Taxon verknüpfen\r
+\r
+command.name.aggregateDistributionForSubtree = Aggregiere Verbreitungsdaten
\ No newline at end of file
index 6383554ac4c3a5821a447d6ebad3a4c5bf79e479..d1caf1ad9c8900b14fd61c930d7ae0a7289f62ba 100644 (file)
@@ -46,6 +46,7 @@
       <handlers xmi:id="_MAkIwL9TEemCian_vXpNsA" elementId="eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemotingMoveFactualDataSetNameInSourceHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemotingMoveFactualDataSetNameInSourceHandlerE5" command="_7qhucL9SEemCian_vXpNsA"/>
       <handlers xmi:id="_ifvyoMWVEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.handler.SetDoubtfulHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.SetDoubtfulHandler" command="_l5_r8MWVEemX2v5WBCy_yg"/>
       <handlers xmi:id="_QolHUMWWEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.handler.removeDoubtfulFlagHandler" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.RemoveDoubtfulHandler" command="_pr-IwMWVEemX2v5WBCy_yg"/>
+      <handlers xmi:id="_3L71YAeiEeqoDLA2i4XAcA" elementId="eu.etaxonomy.taxeditor.navigation.handler.aggregateDistributions" contributionURI="bundleclass://eu.etaxonomy.taxeditor.navigation/eu.etaxonomy.taxeditor.navigation.navigator.e4.handler.AggregateDistributionForSubTreeHandler" command="_mIVKcAeiEeqoDLA2i4XAcA"/>
       <menus xsi:type="menu:PopupMenu" xmi:id="_XNXnkJIvEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigator.popupmenu.taxonnavigator">
         <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_5ydggKkeEeejedk4mZQIGw" coreExpressionId="isCdmStoreConnected"/>
         <children xsi:type="menu:Menu" xmi:id="_yzFmYJIvEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.menu.new" label="%menu.label">
         <children xsi:type="menu:Menu" xmi:id="_o2JjUMBqEeevuODeDZxr4Q" elementId="eu.etaxonomy.taxeditor.navigation.menu.setforsubtree" label="%command.label.subtreeOperations">
           <children xsi:type="menu:HandledMenuItem" xmi:id="_SNIFsK5bEeeDTZvTg-vKRg" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.setpublishforsubtree" label="%command.label.setPublishForSubtree" command="_Jb45kK5bEeeDTZvTg-vKRg"/>
           <children xsi:type="menu:HandledMenuItem" xmi:id="_mLjosJIwEeeJAdt8ZUxyaw" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.setsecforsubtree" label="%command.label.setSecForSubtree" command="_uFj1YJIxEeeJAdt8ZUxyaw"/>
+          <children xsi:type="menu:HandledMenuItem" xmi:id="_cwjGQAejEeqoDLA2i4XAcA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.commandnameaggregatedistributionforsubtree" label="%command.name.aggregateDistributionForSubtree" command="_mIVKcAeiEeqoDLA2i4XAcA"/>
         </children>
         <children xsi:type="menu:Menu" xmi:id="_Nz3dkM1MEeiHbMP3rrIRKQ" elementId="eu.etaxonomy.taxeditor.navigation.menu.set" label="%command.label.nodeUpdates">
           <children xsi:type="menu:HandledMenuItem" xmi:id="_KGONkMWWEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.setDoubtful" label="%command.label.setDoubtful" command="_l5_r8MWVEemX2v5WBCy_yg"/>
     <elements xsi:type="commands:Command" xmi:id="_7qhucL9SEemCian_vXpNsA" elementId="eu.etaxonomy.taxeditor.navigation.moveFactualDataSetNameInSource" commandName="%command.name.moveFactualDataSetNameInSource"/>
     <elements xsi:type="commands:Command" xmi:id="_l5_r8MWVEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.command.setdoubtfulflag" commandName="%command.name.setDoubtful"/>
     <elements xsi:type="commands:Command" xmi:id="_pr-IwMWVEemX2v5WBCy_yg" elementId="eu.etaxonomy.taxeditor.navigation.command.removedoubtfulflag" commandName="%command.name.removeDoubtful"/>
+    <elements xsi:type="commands:Command" xmi:id="_mIVKcAeiEeqoDLA2i4XAcA" elementId="eu.etaxonomy.taxeditor.navigation.command.commandnameaggregatedistributionforsubtree" commandName="%command.name.aggregateDistributionForSubtree"/>
   </fragments>
   <fragments xsi:type="fragment:StringModelFragment" xmi:id="_3CbhIK25EeeykrJkROy5EA" featurename="children" parentElementId="eu.etaxonomy.navigation.menu.new" positionInList="after:eu.etaxonomy.taxeditor.editor.menuseparator.22">
     <elements xsi:type="menu:HandledMenuItem" xmi:id="_M9FakK26EeeykrJkROy5EA" elementId="eu.etaxonomy.taxeditor.navigation.handledmenuitem.commandlabel13" label="%command.label.13" tooltip="%command.label.13" command="_Nx06MJIvEeeJAdt8ZUxyaw">
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/AggregateDistributionForSubTreeHandler.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/AggregateDistributionForSubTreeHandler.java
new file mode 100755 (executable)
index 0000000..aa6f4c0
--- /dev/null
@@ -0,0 +1,156 @@
+/**
+* Copyright (C) 2019 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.navigation.navigator.e4.handler;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.inject.Named;
+
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.api.service.description.DescriptionAggregationConfigurationBase.AggregationMode;
+import eu.etaxonomy.cdm.api.service.description.DistributionAggregationConfiguration;
+import eu.etaxonomy.cdm.filter.TaxonNodeFilter;
+import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
+import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.DistributionAggregationConfiguratorWizard;
+import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
+
+/**
+ * @author k.luther
+ * @since 15.11.2019
+ */
+public class AggregateDistributionForSubTreeHandler extends RemotingCdmHandlerE4 {
+
+
+
+    private TaxonNodeDto taxonNode;
+    private DistributionAggregationConfiguration configurator;
+    private static final String NO = Messages.NO;
+    private static final String CANCEL = Messages.RemotingMoveTaxonNodeHandler_CANCEL;
+    private static final String YES = Messages.YES;
+
+    /**
+     * @param label
+     */
+    public AggregateDistributionForSubTreeHandler() {
+        super("");
+
+    }
+
+
+    @Override
+    public IStatus allowOperations(IStructuredSelection selection, Shell shell, MPart activePart,
+            MHandledMenuItem menuItem) {
+     // check that only a single taxon tree node has been selected
+        if(selection.size() > 1) {  }
+
+        // check for no taxon tree node selected
+        if(selection.size() == 0) {
+            return new Status(IStatus.ERROR,
+                    "unknown", //$NON-NLS-1$
+                    TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
+        }
+
+        // check that selected object is a taxon node
+        Object obj = selection.iterator().next();
+        if(obj instanceof TaxonNodeDto) {
+             taxonNode = (TaxonNodeDto)obj;
+        } else if(obj instanceof Classification){
+            taxonNode = new TaxonNodeDto(((Classification)obj).getRootNode());
+        }else{
+            return new Status(IStatus.ERROR,
+                    "unknown", //$NON-NLS-1$
+                    TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
+        }
+        Collection<IE4SavablePart> dirtyParts = EditorUtil.checkForTaxonChanges(null, partService);
+
+        if (dirtyParts != null && !dirtyParts.isEmpty()){
+            String[] buttonLables = {YES, NO,CANCEL};
+            MessageDialog dialog = new MessageDialog(null,  Messages.SetPublishFlagForSubtreeHandlerE4_UnsavedChanges, null, Messages.SetPublishFlagForSubtreeHandlerE4_UnsavedChangesQuestion, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+            dialog.open();
+            int returnCode = dialog.getReturnCode();
+            boolean proceed = false;
+            if (returnCode == 0){
+                proceed = true;
+            }else if (returnCode == 2){
+                return Status.CANCEL_STATUS;
+            }
+
+            Iterator<IE4SavablePart> partIterator = dirtyParts.iterator();
+            while( partIterator.hasNext() ){
+                IE4SavablePart part = partIterator.next();
+                if (proceed) {
+                    if (part != null){
+                        part.save(new NullProgressMonitor());
+                    }
+                }
+            }
+        }
+
+
+        configurator = DistributionAggregationConfiguration.NewInstance(AggregationMode.byAreasAndRanks(), null, TaxonNodeFilter.NewSubtreeInstance(taxonNode.getUuid()), null);
+        DistributionAggregationConfiguratorWizard wizard = new DistributionAggregationConfiguratorWizard(configurator);
+
+        WizardDialog dialog = new WizardDialog(shell, wizard);
+
+        if (dialog.open() == Window.OK) {
+            return Status.OK_STATUS;
+        }else{
+            return Status.CANCEL_STATUS;
+        }
+    }
+
+    @Override
+    public AbstractOperation prepareOperation(IStructuredSelection selection, Shell shell, MPart activePart,
+            MHandledMenuItem menuItem) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void onComplete() {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    protected Object getTrigger() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @CanExecute
+    private boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, MHandledMenuItem menuItem){
+        boolean canExecute = false;
+        canExecute = selection.size()==1
+                && selection.getFirstElement() instanceof TaxonNodeDto;
+        menuItem.setVisible(canExecute);
+        return canExecute;
+    }
+
+}
index 4edda9281e900720cc36b04714431fa221442cbe..4adedabc7154542abfa385b6b4cf3255a2e76a21 100644 (file)
@@ -699,6 +699,16 @@ public class Messages extends NLS {
     public static String FactualData_description;
 
 
+    public static String DistributionAggregationConfiguration_aggregateToHigherRanks;
+    public static String DistributionAggregationConfiguration_aggregateToHigherRanks_tooltip;
+    public static String DistributionAggregationConfiguration_ClearExistingDistributions;
+    public static String DistributionAggregationConfiguration_AggregationMode;
+    public static String DistributionAggregationConfiguration_SuperArea;
+    public static String DistributionAggregationConfiguration_StatusOrder;
+
+    public static String SetAggregationConfiguration_Title;
+
+
 
 
 
index 731b7d2f78e2f2ce8e43ab1e0175e2e74752a9bc..7ea143d0c508a727e77ecff5c3fcc950ca89a62b 100644 (file)
@@ -529,4 +529,13 @@ Delete=Delete
 Preference_update=Update
 FactualData_showModifier=Show modifier
 FactualData_showModifier_FreeText=Show modifier freetext
-FactualData_description=If a preference is not selectable, there is a serverside preference not allowed to override.
\ No newline at end of file
+FactualData_description=If a preference is not selectable, there is a serverside preference not allowed to override.
+
+DistributionAggregationConfiguration_aggregateToHigherRanks=Aggregate to higher ranks
+DistributionAggregationConfiguration_aggregateToHigherRanks_tooltip=Aggregate to higher ranks
+DistributionAggregationConfiguration_ClearExistingDistributions=Clear existing distributions
+DistributionAggregationConfiguration_AggregationMode=Aggregation mode
+DistributionAggregationConfiguration_SuperArea=Choose super areas
+DistributionAggregationConfiguration_StatusOrder=Choose status order
+
+SetAggregationConfiguration_Title=Aggregation configuration;
\ No newline at end of file
index 0b99a91fcac35fd5a445f6c27ca5a6d9cc7ed192..d9fcc825c27e68e72639d8ef46974ee3050b2bd9 100644 (file)
@@ -529,4 +529,13 @@ Delete=L
 Preference_update=Aktualisieren
 FactualData_showModifier=Zeige Modifier
 FactualData_showModifier_FreeText=Zeige Freitext-Modifier
-FactualData_description=Wenn die Präferenz nicht ausgewählt werden kann, dann gibt es eine serverseitige Präferenz, die das Überschreiben nicht erlaubt.
\ No newline at end of file
+FactualData_description=Wenn die Präferenz nicht ausgewählt werden kann, dann gibt es eine serverseitige Präferenz, die das Überschreiben nicht erlaubt.
+
+DistributionAggregationConfiguration_aggregateToHigherRanks=Aggregiere zu höheren Rängen
+DistributionAggregationConfiguration_aggregateToHigherRanks_tooltip=Aggregiere zu höheren Rängen
+DistributionAggregationConfiguration_ClearExistingDistributions=Lösche existierende Verbreitungen
+DistributionAggregationConfiguration_AggregationMode=Aggregationsmodus
+DistributionAggregationConfiguration_SuperArea=Wähle Super Areale
+DistributionAggregationConfiguration_StatusOrder=Wähle die Status Sortierung
+
+SetAggregationConfiguration_Title=Aggregations Konfiguration;
\ No newline at end of file
index 60f62ce5e89c4f1698cbfd237ab5a541ac9a8f88..bd157c6860628310d04c29e8e0b6c71d4048ac95 100755 (executable)
@@ -66,7 +66,7 @@ public abstract class AbstractTermSelectionWizardPage<T extends AbstractTermDto>
 
     protected abstract String getCheckedValuesFromPreferences();
 
-    protected CheckboxTreeViewer getViewer(){
+    public CheckboxTreeViewer getViewer(){
         return treeComposite.getViewer();
     }
 
index 9efcfc1ad2cbf854b001e5162cbb560d9deaefc4..81249ebcdee88bee0bfe0ba0ba70683eeed627f5 100755 (executable)
@@ -39,7 +39,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class AvailableDistributionPage extends AbstractTermSelectionWizardPage<TermDto> {
 
-    protected AvailableDistributionPage(String pageName) {
+    public AvailableDistributionPage(String pageName) {
         super(pageName, TermType.NamedArea);
         this.localPref = true;
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/SuperAreaSelectionWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/SuperAreaSelectionWizard.java
new file mode 100755 (executable)
index 0000000..be22914
--- /dev/null
@@ -0,0 +1,110 @@
+/**
+* Copyright (C) 2019 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.UUID;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.eclipse.jface.wizard.Wizard;
+
+import eu.etaxonomy.cdm.api.service.description.DistributionAggregationConfiguration;
+import eu.etaxonomy.cdm.persistence.dto.TermDto;
+import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+import eu.etaxonomy.taxeditor.preference.wizard.AvailableDistributionPage;
+
+/**
+ * @author k.luther
+ * @since 25.11.2019
+ */
+public class SuperAreaSelectionWizard extends Wizard {
+
+
+
+       // private ConversationHolder conversation;
+        private final AvailableDistributionPage aPage;
+        DistributionAggregationConfiguration configurator;
+
+        public SuperAreaSelectionWizard(DistributionAggregationConfiguration configurator) {
+            setWindowTitle(Messages.AvailableDistributionWizard_WINDOW_TITLE);
+            // TODO if preferenceStore has elements checked load elements in wizard
+            aPage = new AvailableDistributionPage(Messages.AvailableDistributionWizard_PAGE_TITLE);
+            this.configurator = configurator;
+        }
+
+        @Override
+        public boolean performFinish() {
+            // TODO: get Selection and save in EditorPreferences
+            if (!checkNoneChecked()) {
+                Object[] checkedElements = aPage.getViewer().getCheckedElements();
+                Object[] grayedElements = aPage.getViewer().getGrayedElements();
+                ArrayList checkedList = new ArrayList(Arrays.asList(checkedElements));
+                ArrayList grayedList = new ArrayList(Arrays.asList(grayedElements));
+                checkedList = (ArrayList) CollectionUtils.subtract(checkedList, grayedList);
+                ArrayList<TermDto> listUIIDChecked = new ArrayList<TermDto>();
+                ArrayList<UUID> listUIIDGrayed = new ArrayList<UUID>();
+                for (Object o : checkedList) {
+                    if (o instanceof TermDto) {
+                        listUIIDChecked.add((TermDto) o);
+
+                    }else if(o instanceof TermVocabularyDto){
+                        TermVocabularyDto termVocDto = (TermVocabularyDto) o;
+                        listUIIDGrayed.add(termVocDto.getUuid());
+                    }
+                }
+//                for (Object o : grayedList) {
+//                    if (o instanceof TermDto) {
+//                        listUIIDChecked.add(((TermDto) o).getUuid());
+//
+//                    }else if(o instanceof TermVocabularyDto){
+//                        TermVocabularyDto termVocDto = (TermVocabularyDto) o;
+//                        listUIIDGrayed.add(termVocDto.getUuid());
+//                    }
+//                }
+
+               configurator.setSuperAreas(listUIIDChecked);
+
+
+                return true;
+            } else {
+                return false;
+            }
+        }
+
+        @Override
+        public void addPages() {
+            addPage(aPage);
+        }
+
+        private boolean checkNoneChecked() {
+
+            if (aPage.getViewer().getCheckedElements().length == 0) {
+                aPage.setMessage(Messages.AvailableDistributionWizard_CHECK_MESSAGE, aPage.WARNING);
+                return true;
+            } else {
+                aPage.setMessage(null);
+                return false;
+            }
+        }
+    //
+//        @Override
+//        public ConversationHolder getConversationHolder() {
+//            if (conversation == null) {
+//                conversation = CdmStore.createConversation();
+//            }
+//            return conversation;
+//        }
+    //
+//        @Override
+//        public void update(CdmDataChangeMap changeEvents) {
+//        }
+    }
+
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/DistributionAggregationConfiguratorWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/DistributionAggregationConfiguratorWizard.java
new file mode 100755 (executable)
index 0000000..0c23c0f
--- /dev/null
@@ -0,0 +1,71 @@
+/**
+* Copyright (C) 2019 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.configurator;
+
+import java.util.UUID;
+
+import org.eclipse.jface.wizard.Wizard;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.service.description.DistributionAggregationConfiguration;
+import eu.etaxonomy.cdm.api.service.longrunningService.ILongRunningTasksService;
+import eu.etaxonomy.cdm.filter.TaxonNodeFilter;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+
+/**
+ * @author k.luther
+ * @since 15.11.2019
+ */
+public class DistributionAggregationConfiguratorWizard extends Wizard {
+    private final DistributionAggregationConfiguration configurator;
+    private DistributionAggregationWizardPage page;
+    private ILongRunningTasksService longRunningTaskService;
+
+    public DistributionAggregationConfiguratorWizard(DistributionAggregationConfiguration config) {
+        super();
+        this.configurator = config;
+        setNeedsProgressMonitor(true);
+        this.setWindowTitle(Messages.SetAggregationConfiguration_Title);
+        longRunningTaskService = CdmApplicationState.getLongRunningTasksService();
+    }
+
+
+    @Override
+    public boolean performFinish() {
+
+        configurator.setAggregatingSourceTypes(page.getSourceTypes());
+        configurator.setStatusOrder(page.getStatusOrder());
+        if (page.useSubtree()){
+            configurator.setTaxonNodeFilter(TaxonNodeFilter.NewSubtreeInstance(page.getSubTreeNode()));
+        } else if (page.useClassification()){
+            configurator.setTaxonNodeFilter(TaxonNodeFilter.NewClassificationInstance(page.getSelectedClassification()));
+        } else if (page.useTaxonNode()){
+            configurator.setTaxonNodeFilter(TaxonNodeFilter.NewTaxonNodeInstance(page.getSubTreeNode()));
+        }
+        configurator.getTaxonNodeFilter().setIncludeUnpublished(page.useUnpublishedData());
+        configurator.getTaxonNodeFilter().setRankMax(page.getHigherRank());
+        configurator.getTaxonNodeFilter().setRankMin(page.getLowerRank());
+        configurator.setAggregationMode(page.getAggregationMode());
+
+        UUID uuid = longRunningTaskService.invoke(configurator);
+
+
+        return true;
+    }
+
+
+    @Override
+    public void addPages() {
+        page = new DistributionAggregationWizardPage(configurator);
+        addPage(page);
+
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/DistributionAggregationWizardPage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/DistributionAggregationWizardPage.java
new file mode 100755 (executable)
index 0000000..7e0395d
--- /dev/null
@@ -0,0 +1,546 @@
+/**
+* Copyright (C) 2019 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.configurator;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.api.service.ITermTreeService;
+import eu.etaxonomy.cdm.api.service.description.DescriptionAggregationConfigurationBase.AggregationMode;
+import eu.etaxonomy.cdm.api.service.description.DescriptionAggregationConfigurationBase.SourceMode;
+import eu.etaxonomy.cdm.api.service.description.DistributionAggregationConfiguration;
+import eu.etaxonomy.cdm.filter.LogicFilter;
+import eu.etaxonomy.cdm.model.name.Rank;
+import eu.etaxonomy.cdm.model.name.TaxonName;
+import eu.etaxonomy.cdm.model.reference.OriginalSourceType;
+import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.model.term.TermTree;
+import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.ui.dialog.SuperAreaSelectionWizard;
+
+/**
+ * @author k.luther
+ * @since 15.11.2019
+ */
+public class DistributionAggregationWizardPage extends WizardPage implements Listener, SelectionListener{
+
+    private DistributionAggregationConfiguration configurator;
+
+    private Combo comboHigherRank;
+    private Combo comboLowerRank;
+
+    private Combo comboSourceMode;
+
+    private Combo comboAggregationMode;
+
+    private Button btnSelectSuperAreas;
+    private Combo comboStatusOrder;
+
+
+    private Combo comboClassificationSelection;
+    private List<Classification> classifications;
+    private Classification selectedClassification;
+
+
+
+    private Button checkUseSelectedTaxonNode;
+    private Button checkUseSelectedClassification;
+    private Button checkUseSelectedSubtree;
+
+
+    private Button checkExportUnpublished;
+
+    private TaxonNode subTreeNode;
+    private CheckboxTableViewer sourceTypeViewer;
+    Object[] checkedElements;
+    Map<String, OriginalSourceType> typeMap = new HashMap();
+
+
+    /**
+     * @param pageName
+     */
+    public DistributionAggregationWizardPage(DistributionAggregationConfiguration configurator) {
+        super("Set Publish Flag Configuration");
+        this.configurator = configurator;
+
+        this.setDescription(Messages.SetPublishConfiguration_Description_Configurator);
+
+    }
+
+
+    @Override
+    public void createControl(Composite parent) {
+        final Composite composite = new Composite(parent, SWT.NULL);
+        checkExportUnpublished = new Button(composite,  SWT.CHECK);
+        checkExportUnpublished.setText("Export unpublished taxa");
+        GridData gridDataCheckUnpublished = new GridData(GridData.FILL_HORIZONTAL);
+        gridDataCheckUnpublished.horizontalSpan = 2;
+
+
+        Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
+        GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+        gridData.horizontalSpan = 2;
+        gridData.verticalIndent = 5;
+        separator.setLayoutData(gridData);
+
+        String taxonStr = "";
+        int count = configurator.getTaxonNodeFilter().getSubtreeFilter().size();
+       // TaxonNode node = null;
+        for (LogicFilter<TaxonNode> filter: configurator.getTaxonNodeFilter().getSubtreeFilter()){
+            subTreeNode = CdmApplicationState.getCurrentAppConfig().getTaxonNodeService().load(filter.getUuid());
+            count--;
+            if (subTreeNode.hasTaxon()){
+                taxonStr += subTreeNode.getTaxon().getName().getTitleCache();
+                if (count>0){
+                    taxonStr += ", ";
+                }
+            }
+        }
+        if (StringUtils.isNotBlank(taxonStr)){
+            checkUseSelectedTaxonNode= new Button(composite,  SWT.RADIO);
+            checkUseSelectedTaxonNode.setText("Aggregation only for ("+  taxonStr+")");
+            checkUseSelectedTaxonNode.addListener(SWT.Selection, new Listener() {
+                @Override
+                public void handleEvent(Event e) {
+                    Button b = (Button) e.widget;
+                    GridData data = (GridData)  comboClassificationSelection.getLayoutData();
+                    data.exclude = b.getSelection();
+                    comboClassificationSelection.setEnabled(!data.exclude);
+                    updateHigherRankCombo();
+                }
+
+
+            });
+
+            checkUseSelectedSubtree= new Button(composite,  SWT.RADIO);
+            checkUseSelectedSubtree.setText("Aggregation for selected subtree(s) ("+  taxonStr+")");
+            checkUseSelectedSubtree.addListener(SWT.Selection, new Listener() {
+                @Override
+                public void handleEvent(Event e) {
+                    Button b = (Button) e.widget;
+                    GridData data = (GridData)  comboClassificationSelection.getLayoutData();
+                    data.exclude = b.getSelection();
+                    comboClassificationSelection.setEnabled(!data.exclude);
+
+                    updateHigherRankCombo();
+               }
+            });
+
+        }
+
+
+          checkUseSelectedClassification= new Button(composite,  SWT.RADIO);
+          checkUseSelectedClassification.setText("Export selected classification");
+          checkUseSelectedClassification.addListener(SWT.Selection, new Listener() {
+               @Override
+               public void handleEvent(Event e) {
+                   Button b = (Button) e.widget;
+                   GridData data = (GridData)  comboClassificationSelection.getLayoutData();
+                   data.exclude = b.getSelection();
+                   comboClassificationSelection.setEnabled(data.exclude);
+                   updateHigherRankCombo();
+                  }
+            });
+
+
+            GridLayoutFactory.fillDefaults();
+
+            if (subTreeNode!= null){
+                selectedClassification = subTreeNode.getClassification();
+            }
+            GridData gridDataClassificationCombo = new GridData();
+            gridDataClassificationCombo = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
+            gridDataClassificationCombo.horizontalIndent = 5;
+//          classificationSelection.setLayoutData(gridData);
+
+            comboClassificationSelection = new Combo(composite, SWT.BORDER| SWT.READ_ONLY);
+            comboClassificationSelection.setLayoutData(gridDataClassificationCombo);
+            classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, null);
+            Collections.sort(classifications, new Comparator<Classification>() {
+
+                @Override
+                public int compare(Classification o1, Classification o2) {
+                    if (o1.equals(o2)){
+                        return 0;
+                    }
+                    int result = o1.getTitleCache().compareTo(o2.getTitleCache());
+                    if (result == 0){
+                        return o1.getUuid().compareTo(o2.getUuid());
+                    }
+                    return result;
+                }
+            });
+            for(Classification tree : classifications){
+                comboClassificationSelection.add(tree.getName().getText(), classifications.indexOf(tree));
+
+            }
+
+            comboClassificationSelection.select(classifications.indexOf(selectedClassification));
+
+            // TODO remember last selection
+            comboClassificationSelection.addSelectionListener(this);
+
+            if (StringUtils.isNotBlank(taxonStr)){
+                checkUseSelectedTaxonNode.setSelection(true);
+                comboClassificationSelection.setEnabled(false);
+            }else{
+                checkUseSelectedClassification.setSelection(true);
+            }
+            separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
+            gridData = new GridData(GridData.FILL_HORIZONTAL);
+            gridData.horizontalSpan = 2;
+            gridData.verticalIndent = 5;
+            separator.setLayoutData(gridData);
+
+/*
+ *
+
+    TaxonNodeFilter parameter
+        subtrees (TaxonNode) - if started from navigator by taxon node kontext menu, this should be prefilled
+        upperRank and lower rank, both are optional, but upperRank should not show ranks above the rank of the selected taxonnode (if any selected)
+        includeUnpublished (not yet fully implemented but definetely needed)
+        taxonNodes: if we want to allow to update single taxonNodes (without subtree) we can use this, maybe the UI can have a checkbox "on subtree/on taxon only" to switch between subtrees/taxonNodes
+
+
+    statusOrder: this is a link on all TermTree in the DB, which can be created with TaxEditor now. If empty the default ordering of the vocabulary for PresenceAbsenceTerm is taken, so if you want you can also add this vocabulary to the selection list
+
+    SourceMode: List of the available enum of same name, a human readable version is still missing
+
+    aggregatingSourceTypes: source types to use for aggregation, by default it is the both PrimaryXXX
+
+ */
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 1;
+
+        composite.setLayout(gridLayout);
+        final Composite control = new Composite(composite, SWT.NULL);
+        GridLayout gridLayoutControl = new GridLayout();
+        gridLayoutControl.numColumns = 2;
+        control.setLayout(gridLayoutControl);
+        control.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, true));
+
+        Label higherRankLabel = new Label(control, SWT.NULL);
+        higherRankLabel.setText("Higher rank");
+        comboHigherRank = new Combo(control, SWT.BORDER | SWT.READ_ONLY);
+        updateHigherRankCombo();
+        comboHigherRank.addListener(SWT.Selection, this);
+        Label lowerRankLabel = new Label(control, SWT.NULL);
+        lowerRankLabel.setText("Lower rank");
+        comboLowerRank = new Combo(control, SWT.BORDER | SWT.READ_ONLY);
+        updateLowerRankCombo();
+        comboLowerRank.addListener(SWT.Selection, this);
+
+        Label sourceModeLabel = new Label(control, SWT.NULL);
+        sourceModeLabel.setText("Source mode");
+        comboSourceMode = new Combo(control,  SWT.BORDER| SWT.READ_ONLY);
+        comboSourceMode.setText(Messages.DistributionAggregationConfiguration_AggregationMode);
+        for (SourceMode mode :SourceMode.values()){
+            comboSourceMode.add(mode.toString());
+            comboSourceMode.setData(mode.toString(), mode);
+        }
+
+        comboSourceMode.addSelectionListener(this);
+
+        Label aggregationModeLabel = new Label(control, SWT.NULL);
+        aggregationModeLabel.setText("Aggregation mode");
+        comboAggregationMode = new Combo(control,  SWT.BORDER| SWT.READ_ONLY);
+        comboAggregationMode.setText(Messages.DistributionAggregationConfiguration_AggregationMode);
+//        for (AggregationMode mode: AggregationMode.values()){
+//            comboAggregationMode.add(mode.toString());
+//            comboAggregationMode.setData(mode.toString(), mode);
+//        }
+        comboAggregationMode.add("ranks");
+        comboAggregationMode.setData("ranks", AggregationMode.byRanks());
+
+        comboAggregationMode.add("areas and ranks");
+        comboAggregationMode.setData("areas and ranks", AggregationMode.byAreasAndRanks());
+
+        comboAggregationMode.add("areas");
+        comboAggregationMode.setData("areas", AggregationMode.byAreas());
+
+
+        comboAggregationMode.addSelectionListener(this);
+
+        Label sourceTypeLabel = new Label(control, SWT.NULL);
+        sourceTypeLabel.setText("Source type");
+
+        sourceTypeViewer = CheckboxTableViewer.newCheckList(control, SWT.BORDER | SWT.SINGLE);
+        sourceTypeViewer.setContentProvider(new ArrayContentProvider());
+
+
+        sourceTypeViewer.addCheckStateListener(new ICheckStateListener(){
+            @Override
+            public void checkStateChanged(    CheckStateChangedEvent event){
+                checkedElements=sourceTypeViewer.getCheckedElements();
+                getWizard().getContainer().updateButtons();
+              }
+        });
+
+        List<String> typeStrings = new ArrayList<>();
+        Arrays.stream(OriginalSourceType.values()).forEach(p ->typeMap.put(p.getMessage(), p));
+        Arrays.stream(OriginalSourceType.values()).forEach(p ->typeStrings.add(p.getMessage()));
+        sourceTypeViewer.setInput(typeStrings);
+        sourceTypeViewer.setChecked(OriginalSourceType.PrimaryMediaSource.getMessage(), true);
+        sourceTypeViewer.setChecked(OriginalSourceType.PrimaryTaxonomicSource.getMessage(), true);
+
+        //aggregation mode
+
+
+
+        Label selectStatusLabel = new Label(control, SWT.NULL);
+        selectStatusLabel.setText("Status order");
+        comboStatusOrder = new Combo(control, SWT.PUSH );
+
+        for (TermTree tree: CdmStore.getService(ITermTreeService.class).list(TermType.PresenceAbsenceTerm, null, 0, null,null)){
+            comboStatusOrder.add(tree.getTitleCache());
+            comboStatusOrder.setData(tree.getTitleCache(), tree);
+        }
+        comboStatusOrder.setText(Messages.DistributionAggregationConfiguration_StatusOrder);
+        comboStatusOrder.addSelectionListener(this);
+
+        Button buttonSuperArea = new Button(control, SWT.PUSH );
+        GridData gridData2 = new GridData();
+        gridData2.horizontalSpan = 1;
+        gridData2.horizontalAlignment = SWT.RIGHT;
+
+        buttonSuperArea.setLayoutData(gridData2);
+
+
+        buttonSuperArea.setText("Select Super Areas");
+//        buttonSuperArea.setToolTipText(Messages.ChecklistEditor_DIST_STATUS_TOOLTIP);
+        buttonSuperArea.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent event) {
+                SuperAreaSelectionWizard availableDistributionWizard = new SuperAreaSelectionWizard(configurator);
+                WizardDialog dialog = new WizardDialog(StoreUtil.getShell(),
+                        availableDistributionWizard);
+
+                int open = dialog.open();
+
+            }
+        });
+
+        GridLayoutFactory.fillDefaults();
+
+
+
+        setControl(composite);
+
+    }
+
+
+
+
+
+
+    @Override
+    public void widgetSelected(SelectionEvent e) {
+        if (e.getSource().equals(comboSourceMode)){
+
+            configurator.setToParentSourceMode((SourceMode)comboSourceMode.getData(comboSourceMode.getText()));
+            configurator.setWithinTaxonSourceMode((SourceMode)comboSourceMode.getData(comboSourceMode.getText()));
+        }
+
+
+    }
+
+
+    @Override
+    public void widgetDefaultSelected(SelectionEvent e) {
+        // TODO Auto-generated method stub
+
+    }
+
+
+    @Override
+    public void handleEvent(Event event) {
+        if (event.widget.equals(comboHigherRank)){
+            updateLowerRankCombo();
+        }
+        if (event.widget.equals(selectedClassification)){
+            updateHigherRankCombo();
+            updateLowerRankCombo();
+        }
+        if (event.widget.equals(this.checkUseSelectedClassification)){
+            updateHigherRankCombo();
+            updateLowerRankCombo();
+        }
+        if (event.widget.equals(this.checkUseSelectedSubtree)){
+            updateHigherRankCombo();
+            updateLowerRankCombo();
+        }
+        if (event.widget.equals(this.checkUseSelectedTaxonNode)){
+            updateHigherRankCombo();
+            updateLowerRankCombo();
+        }
+
+    }
+
+    private void updateHigherRankCombo() {
+        comboHigherRank.removeAll();
+
+        TaxonName name = null;
+        if (subTreeNode != null){
+            if (subTreeNode.getTaxon() != null){
+                name = subTreeNode.getTaxon().getName();
+            }
+        }
+        comboHigherRank.add("");
+        if (name != null){
+            for (Rank rank: CdmStore.getTermManager().getPreferredTerms(Rank.class)){
+                if (useClassification()){
+                    comboHigherRank.add(rank.getLabel());
+                    comboHigherRank.setData(rank.getLabel(), rank);
+                }else if (name != null && name.getRank().isHigher(rank)){
+                    comboHigherRank.add(rank.getLabel());
+                    comboHigherRank.setData(rank.getLabel(), rank);
+                }
+
+            }
+        }else{
+            for (Rank rank: CdmStore.getTermManager().getPreferredTerms(Rank.class)){
+                comboHigherRank.add(rank.getLabel());
+                comboHigherRank.setData(rank.getLabel(), rank);
+            }
+        }
+
+    }
+
+
+   private void updateLowerRankCombo() {
+       comboLowerRank.removeAll();
+       TaxonName name = null;
+       if (subTreeNode != null){
+           if (subTreeNode.getTaxon() != null){
+               name = subTreeNode.getTaxon().getName();
+           }
+       }
+       comboLowerRank.add("");
+       for (Rank rank: CdmStore.getTermManager().getPreferredTerms(Rank.class)){
+           if (subTreeNode == null && (comboHigherRank.getText() == null || (comboHigherRank.getData(comboHigherRank.getText()) != null && ((Rank)comboHigherRank.getData(comboHigherRank.getText())).isHigher(rank)))){
+               comboLowerRank.add(rank.getLabel());
+               comboLowerRank.setData(rank.getLabel(), rank);
+           }else if (name == null || name.getRank().isHigher(rank)) {
+               if(StringUtils.isBlank(comboHigherRank.getText()) || comboHigherRank.getData(comboHigherRank.getText()) != null && ((Rank)comboHigherRank.getData(comboHigherRank.getText())).isHigher(rank)){
+               // the rank is lower than higher rank and lower than the rank of the subtree name
+                   comboLowerRank.add(rank.getLabel());
+                   comboLowerRank.setData(rank.getLabel(), rank);
+               }
+           }
+       }
+
+
+   }
+
+   public Rank getHigherRank(){
+       if (StringUtils.isNotBlank(comboHigherRank.getText())){
+           return (Rank)comboHigherRank.getData(comboHigherRank.getText());
+       }
+       return null;
+   }
+
+   public Rank getLowerRank(){
+       if (StringUtils.isNotBlank(comboLowerRank.getText())){
+           return (Rank)comboLowerRank.getData(comboLowerRank.getText());
+       }
+       return null;
+   }
+
+   public SourceMode getSourceMode(){
+       if (StringUtils.isNotBlank(comboSourceMode.getText())){
+           return (SourceMode)comboSourceMode.getData(comboSourceMode.getText());
+       }
+       return null;
+   }
+
+   public TermTree getStatusOrder(){
+       if (StringUtils.isNotBlank(comboStatusOrder.getText())){
+           return (TermTree)comboStatusOrder.getData(comboStatusOrder.getText());
+       }
+       return null;
+   }
+
+   public boolean useClassification(){
+       return checkUseSelectedClassification.getSelection();
+   }
+
+   public boolean useSubtree(){
+       return checkUseSelectedSubtree.getSelection();
+   }
+
+   public boolean useTaxonNode(){
+       return checkUseSelectedTaxonNode.getSelection();
+   }
+
+   public boolean useUnpublishedData(){
+       return checkExportUnpublished.getSelection();
+   }
+
+   public EnumSet<OriginalSourceType> getSourceTypes(){
+       List<OriginalSourceType> list = new ArrayList<>();
+       for (Object o: sourceTypeViewer.getCheckedElements()){
+           String string = null;
+           if (o instanceof String){
+               string = (String)o;
+           }
+           if (string != null){
+               list.add(typeMap.get(string));
+           }
+       }
+
+       return EnumSet.copyOf(list);
+   }
+
+   public List<AggregationMode> getAggregationMode(){
+       return (List<AggregationMode>) comboAggregationMode.getData(comboAggregationMode.getText());
+   }
+
+
+    public Classification getSelectedClassification() {
+        return selectedClassification;
+    }
+
+
+    public TaxonNode getSubTreeNode() {
+        return subTreeNode;
+    }
+}
index 9a11d5b4dfc9e3f104413fc7bd55908c5af39531..7a87d7f8994d95caa484d4ea7e9d11b1a6057e50 100755 (executable)
@@ -24,9 +24,7 @@ import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
 
 import eu.etaxonomy.cdm.api.service.config.PublishForSubtreeConfigurator;
 import eu.etaxonomy.taxeditor.l10n.Messages;
@@ -37,7 +35,7 @@ import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
  * @date 10.10.2017
  *
  */
-public class PublishSubTreeConfiguratorWizardPage extends WizardPage implements Listener, SelectionListener {
+public class PublishSubTreeConfiguratorWizardPage extends WizardPage implements SelectionListener {
 
     private DataBindingContext m_bindingContext;
 
@@ -127,14 +125,7 @@ public class PublishSubTreeConfiguratorWizardPage extends WizardPage implements
         setControl(composite);
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
-     */
-    @Override
-    public void handleEvent(Event event) {
-        // TODO Auto-generated method stub
 
-    }
 
     protected DataBindingContext initDataBindings() {
         DataBindingContext bindingContext = new DataBindingContext();
index c4ae517587927c917a91628007a1c35fab7eba30..cb71551073095e50b103a2b92a11eea9865c2cba 100755 (executable)
@@ -239,14 +239,7 @@ public class SetSecundumConfiguratorWizardPage extends WizardPage implements Lis
 
     }
 
-//    /**
-//     * {@inheritDoc}
-//     */
-//    @Override
-//    public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
-//        // TODO Auto-generated method stub
-//        return null;
-//    }
+