3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.io
.wizard
;
15 import org
.eclipse
.core
.runtime
.jobs
.Job
;
16 import org
.eclipse
.jface
.viewers
.IStructuredSelection
;
17 import org
.eclipse
.ui
.IWorkbench
;
18 import org
.eclipse
.ui
.progress
.IProgressConstants
;
20 import eu
.etaxonomy
.cdm
.io
.sdd
.out
.SDDExportConfigurator
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * <p>SddExportWizard class.</p>
27 * @created Jun 16, 2010
30 public class SddExportWizard
extends AbstractExportWizard
<SDDExportConfigurator
> {
32 private ExportToFileDestinationWizardPage page
;
34 private SDDExportConfigurator configurator
;
37 * @see eu.etaxonomy.taxeditor.io.wizard.AbstractExportWizard#getConfigurator()
41 public SDDExportConfigurator
getConfigurator() {
46 * @see org.eclipse.jface.wizard.Wizard#performFinish()
50 public boolean performFinish() {
51 File file
= new File(page
.getFolderText() + File
.separator
+ page
.getExportFileName());
53 if(CdmStore
.getCurrentSessionManager().isRemoting()) {
55 Job job
= CdmStore
.getExportManager().createIOServiceJob(configurator
, file
);
57 job
.setProperty(IProgressConstants
.KEEP_PROPERTY
, true);
62 configurator
.setDestination(file
);
63 CdmStore
.getExportManager().run(configurator
);
70 * @see eu.etaxonomy.taxeditor.io.wizard.AbstractExportWizard#addPages()
74 public void addPages() {
77 page
= ExportToFileDestinationWizardPage
.Sdd();
82 * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
86 public void init(IWorkbench workbench
, IStructuredSelection selection
) {
87 this.setWindowTitle("SDD Export");
88 this.configurator
= CdmStore
.getExportManager().SddConfigurator();