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
;
16 import org
.eclipse
.core
.runtime
.jobs
.Job
;
17 import org
.eclipse
.jface
.viewers
.IStructuredSelection
;
18 import org
.eclipse
.ui
.IWorkbench
;
19 import org
.eclipse
.ui
.progress
.IProgressConstants
;
21 import eu
.etaxonomy
.cdm
.io
.jaxb
.JaxbExportConfigurator
;
22 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
25 * <p>JaxbExportWizard class.</p>
31 public class JaxbExportWizard
extends AbstractExportWizard
<JaxbExportConfigurator
> {
33 private ExportToFileDestinationWizardPage page
;
35 private JaxbExportConfigurator configurator
;
38 * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
42 public void init(IWorkbench workbench
, IStructuredSelection selection
) {
43 this.setWindowTitle("JAXB Export");
44 this.configurator
= CdmStore
.getExportManager().JaxbConfigurator();
48 * @see org.eclipse.jface.wizard.Wizard#performFinish()
52 public boolean performFinish() {
53 boolean performFinish
= false;
55 File exportFile
= new File(page
.getFolderText() + File
.separator
+ page
.getExportFileName());
56 URI urlString
= exportFile
.toURI();
57 configurator
.setDestination(urlString
);
58 if(CdmStore
.getCurrentSessionManager().isRemoting()) {
60 Job job
= CdmStore
.getExportManager().createIOServiceJob(configurator
, exportFile
);
62 job
.setProperty(IProgressConstants
.KEEP_PROPERTY
, true);
67 CdmStore
.getExportManager().run(configurator
);
74 * @see org.eclipse.jface.wizard.Wizard#addPages()
78 public void addPages() {
81 page
= ExportToFileDestinationWizardPage
.Jaxb();
86 * @see eu.etaxonomy.taxeditor.io.AbstractExportWizard#getConfigurator()
90 public JaxbExportConfigurator
getConfigurator() {