ref #10448: set family string in configurator
authorKatja Luther <k.luther@bgbm.org>
Wed, 24 Jan 2024 09:05:39 +0000 (10:05 +0100)
committerKatja Luther <k.luther@bgbm.org>
Wed, 24 Jan 2024 09:05:39 +0000 (10:05 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/out/wfo/WFOExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExportToFileDestinationWizardPage.java

index 91c9fd3609be8111f9db382a33fafc93964494ab..bcf2ec23f836f4999657bbf09553ee2df943520d 100644 (file)
@@ -18,6 +18,7 @@ import java.util.UUID;
 import javax.inject.Inject;
 import javax.inject.Named;
 
+import org.apache.commons.lang.StringUtils;
 import org.eclipse.e4.core.contexts.ContextInjectionFactory;
 import org.eclipse.e4.core.contexts.IEclipseContext;
 import org.eclipse.e4.core.di.annotations.Optional;
@@ -99,8 +100,11 @@ public class WFOExportWizard extends
 
                        }
                }
+               if (StringUtils.isNotBlank(page.getFamilyString())) {
+                   configurator.setFamilyStr(page.getFamilyString());
+               }
+            CdmStore.getExportManager().runMoniteredOperation(configurator, urlString);
 
-               CdmStore.getExportManager().runMoniteredOperation(configurator, urlString);
                return true;
        }
 
index 5165027fb359105eab827b2e034cc38bd8077fe5..750841e59aaf671a49ff189def4581490b9ee97a 100644 (file)
@@ -132,6 +132,8 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
 
     private Combo orderSelectionCombo;
 
+    private Text text_familyString;
+
     protected ExportToFileDestinationWizardPage(String pageName, String type, String title, String description,
             String extension, ExportConfiguratorBase<?, ?, ?> configurator) {
         super(pageName);
@@ -343,7 +345,7 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
 
                     Label familyString = new Label(wfoComp, SWT.NONE);
                     familyString.setText("Family");
-                    Text text_familyString = new Text(wfoComp, SWT.BORDER);
+                    text_familyString = new Text(wfoComp, SWT.BORDER);
                     text_familyString.setText(generateFamilyName(selectedNodes));
                     text_familyString.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
 
@@ -550,6 +552,13 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
         return text_exportFileName.getText();
     }
 
+    /**
+     * @return the familyString
+     */
+    public String getFamilyString() {
+        return text_familyString.getText();
+    }
+
     public String getFolderText() {
         return text_folder.getText();
     }