Merge branch 'develop' into remoting-4.0
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / io / AbstractIOManager.java
index 2504f4a1746edbacbacd88e041137d6cc4ba2462..5b01fc7e08258a87e32a888c0c4a2be1e8545bce 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
  * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
@@ -20,7 +20,7 @@ import eu.etaxonomy.cdm.io.common.IIoConfigurator;
  * <p>
  * Abstract AbstractIOHandler class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Sep 11, 2009
  * @version 1.0
@@ -37,7 +37,7 @@ public abstract class AbstractIOManager<CONFIGURATOR extends IIoConfigurator> {
         * <p>
         * Constructor for AbstractIOHandler.
         * </p>
-        * 
+        *
         * @param applicationController
         *            a
         *            {@link eu.etaxonomy.cdm.api.application.CdmApplicationController}
@@ -52,29 +52,33 @@ public abstract class AbstractIOManager<CONFIGURATOR extends IIoConfigurator> {
 
        /**
         * Starts the IO process
-        * 
+        *
         * @param configurator
         *            a CONFIGURATOR object.
         */
        public void run(final CONFIGURATOR configurator) {
-               // create job
-               Job job = createIOJob(configurator);
-               // configure the job
-               job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
-               job.setUser(true);
-               // schedule job
-               job.schedule();
+           // create job
+           Job job = createIOJob(configurator);
+           run(job);
+       }
 
+       public void run(Job job) {
+           // configure the job
+           job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
+           job.setUser(true);
+           // schedule job
+           job.schedule();
        }
 
        /**
         * <p>
         * createIOJob
         * </p>
-        * 
+        *
         * @param configurator
         *            a CONFIGURATOR object.
         * @return a {@link org.eclipse.core.runtime.jobs.Job} object.
         */
        protected abstract Job createIOJob(CONFIGURATOR configurator);
+
 }