1 package eu
.etaxonomy
.cdm
.database
.update
;
3 import eu
.etaxonomy
.cdm
.common
.IProgressMonitor
;
4 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
6 public interface ITermUpdater
{
9 * Invokes this CDM term updater and updates the schema up to the current CDM
10 * term version. Throws an exception if this updaters target version does
11 * not equal the current CDM schema version.
17 boolean invoke(ICdmDataSource datasource
, IProgressMonitor monitor
) throws Exception
;
20 * Invokes this CDM term updater and updates the terms up to the given
21 * target version. Throws an exception if this updaters target version does
22 * not equal the given target version.
23 * @param targetVersion
29 boolean invoke(String targetVersion
, ICdmDataSource datasource
, IProgressMonitor monitor
) throws Exception
;
32 * Returns the previous CDM term updater
35 public ITermUpdater
getPreviousUpdater();
38 * Returns the next CDM term updater
41 public ITermUpdater
getNextUpdater();
44 * Returns the number of steps to run to update the datasource
45 * to the term version this term updater is updating to.
46 * This includes needed steps in previous updaters.
47 * @see #getPreviousUpdater()
48 * @return number of steps
50 int countSteps(ICdmDataSource datasource
);
52 String
getTargetVersion();