Revision 43527305
Added by Cherian Mathew over 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExcelNormalExplicitTaxaImportWizard.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
package eu.etaxonomy.taxeditor.io.wizard; |
12 | 12 |
|
13 |
import java.io.File; |
|
13 | 14 |
import java.net.URI; |
14 | 15 |
|
16 |
import org.eclipse.core.runtime.jobs.Job; |
|
15 | 17 |
import org.eclipse.jface.viewers.IStructuredSelection; |
16 | 18 |
import org.eclipse.ui.IWorkbench; |
17 | 19 |
|
18 | 20 |
import eu.etaxonomy.cdm.database.DbSchemaValidation; |
21 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE; |
|
19 | 22 |
import eu.etaxonomy.cdm.io.excel.taxa.NormalExplicitImportConfigurator; |
20 | 23 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
21 | 24 |
|
... | ... | |
52 | 55 |
configurator.setSource(source); |
53 | 56 |
configurator.setDbSchemaValidation(DbSchemaValidation.CREATE); |
54 | 57 |
|
55 |
CdmStore.getImportManager().run(configurator); |
|
58 |
if(CdmStore.getCurrentSessionManager().isRemoting()) { |
|
59 |
Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI); |
|
60 |
CdmStore.getImportManager().run(job); |
|
61 |
} else { |
|
62 |
CdmStore.getImportManager().run(configurator); |
|
63 |
} |
|
64 |
|
|
56 | 65 |
|
57 | 66 |
return true; |
58 | 67 |
} |
Also available in: Unified diff
#5130 Extend import wizards to import data via remoting and Add tests for the same