2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.io
;
12 import org
.eclipse
.core
.runtime
.jobs
.Job
;
13 import org
.eclipse
.ui
.progress
.IProgressConstants
;
15 import eu
.etaxonomy
.cdm
.api
.application
.ICdmRepository
;
16 import eu
.etaxonomy
.cdm
.io
.common
.IIoConfigurator
;
20 * Abstract AbstractIOHandler class.
24 * @created Sep 11, 2009
27 public abstract class AbstractIOManager
<CONFIGURATOR
extends IIoConfigurator
> {
29 protected ICdmRepository applicationConfiguration
;
31 public static enum TYPE
{
32 Jaxb
, Tcs
, Excel_Taxa
, Endnote
, Sdd
, Abcd
, SpecimenCdmExcel
, Excel_Name
, SpecimenSearch
, Gbif
37 * Constructor for AbstractIOHandler.
40 * @param applicationController
42 * {@link eu.etaxonomy.cdm.api.application.CdmApplicationController}
44 * @param <CONFIGURATOR>
45 * a CONFIGURATOR object.
47 protected AbstractIOManager(
48 ICdmRepository applicationConfiguration
) {
49 this.applicationConfiguration
= applicationConfiguration
;
53 * Starts the IO process
56 * a CONFIGURATOR object.
58 public void run(final CONFIGURATOR configurator
) {
60 Job job
= createIOJob(configurator
);
64 public void run(Job job
) {
66 job
.setProperty(IProgressConstants
.KEEP_PROPERTY
, true);
78 * a CONFIGURATOR object.
79 * @return a {@link org.eclipse.core.runtime.jobs.Job} object.
81 protected abstract Job
createIOJob(CONFIGURATOR configurator
);