1
|
/**
|
2
|
* Copyright (C) 2009 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.database.update;
|
10
|
|
11
|
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
|
12
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
13
|
|
14
|
/**
|
15
|
* Interface for {@link ISchemaUpdater}.
|
16
|
* Originally also for and ITermUpdater which does not exist anymore.
|
17
|
*
|
18
|
* @author a.mueller
|
19
|
* @since 16.11.2010
|
20
|
*/
|
21
|
public interface IUpdater<U extends IUpdater<U>> {
|
22
|
|
23
|
/**
|
24
|
* Returns the previous CDM term/schema updater
|
25
|
* @return
|
26
|
*/
|
27
|
public U getPreviousUpdater();
|
28
|
|
29
|
/**
|
30
|
* Returns the number of steps to run to update the datasource
|
31
|
* to the schema this schema updater is updating to.
|
32
|
* This includes needed steps in previous updaters.
|
33
|
* @param caseType
|
34
|
* @see #getPreviousUpdater()
|
35
|
* @return number of steps
|
36
|
*/
|
37
|
int countSteps(ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType);
|
38
|
|
39
|
|
40
|
public void invoke(ICdmDataSource datasource, IProgressMonitor monitor,
|
41
|
CaseType caseType, SchemaUpdateResult result) throws Exception;
|
42
|
|
43
|
public void invoke(String targetVersion, ICdmDataSource datasource,
|
44
|
IProgressMonitor monitor, CaseType caseType, SchemaUpdateResult result) throws Exception;
|
45
|
|
46
|
}
|