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
;
13 import org
.eclipse
.core
.runtime
.jobs
.Job
;
14 import org
.eclipse
.ui
.progress
.IProgressConstants
;
16 import eu
.etaxonomy
.cdm
.api
.application
.ICdmApplicationConfiguration
;
17 import eu
.etaxonomy
.cdm
.io
.common
.IIoConfigurator
;
21 * Abstract AbstractIOHandler class.
25 * @created Sep 11, 2009
28 public abstract class AbstractIOManager
<CONFIGURATOR
extends IIoConfigurator
> {
30 protected ICdmApplicationConfiguration applicationConfiguration
;
32 public static enum TYPE
{
33 Jaxb
, Tcs
, Excel_Taxa
, Endnote
, Sdd
, Abcd
, SpecimenCdmExcel
, Excel_Name
38 * Constructor for AbstractIOHandler.
41 * @param applicationController
43 * {@link eu.etaxonomy.cdm.api.application.CdmApplicationController}
45 * @param <CONFIGURATOR>
46 * a CONFIGURATOR object.
48 protected AbstractIOManager(
49 ICdmApplicationConfiguration applicationConfiguration
) {
50 this.applicationConfiguration
= applicationConfiguration
;
54 * Starts the IO process
57 * a CONFIGURATOR object.
59 public void run(final CONFIGURATOR configurator
) {
61 Job job
= createIOJob(configurator
);
65 public void run(Job job
) {
67 job
.setProperty(IProgressConstants
.KEEP_PROPERTY
, true);
79 * a CONFIGURATOR object.
80 * @return a {@link org.eclipse.core.runtime.jobs.Job} object.
82 protected abstract Job
createIOJob(CONFIGURATOR configurator
);