1 |
1d36aa54
|
Andreas Müller
|
// $Id$
|
2 |
|
|
/**
|
3 |
|
|
* Copyright (C) 2009 EDIT
|
4 |
|
|
* European Distributed Institute of Taxonomy
|
5 |
|
|
* http://www.e-taxonomy.eu
|
6 |
|
|
*
|
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.
|
9 |
|
|
*/
|
10 |
|
|
package eu.etaxonomy.cdm.database.update;
|
11 |
|
|
|
12 |
bd1d3bee
|
Andreas Müller
|
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
|
13 |
1d36aa54
|
Andreas Müller
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
14 |
|
|
|
15 |
|
|
/**
|
16 |
b121eb12
|
Andreas Müller
|
* Common interface for {@link ISchemaUpdater} and {@link ITermUpdater}
|
17 |
|
|
*
|
18 |
1d36aa54
|
Andreas Müller
|
* @author a.mueller
|
19 |
|
|
* @date 16.11.2010
|
20 |
|
|
*/
|
21 |
b8833305
|
Andreas Müller
|
public interface IUpdater<U extends IUpdater<U>> {
|
22 |
1d36aa54
|
Andreas Müller
|
|
23 |
|
|
|
24 |
|
|
/**
|
25 |
|
|
* Returns the previous CDM term/schema updater
|
26 |
|
|
* @return
|
27 |
|
|
*/
|
28 |
|
|
public U getPreviousUpdater();
|
29 |
|
|
|
30 |
|
|
/**
|
31 |
|
|
* Returns the next CDM term/schema updater
|
32 |
|
|
* @return
|
33 |
|
|
*/
|
34 |
|
|
public U getNextUpdater();
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
/**
|
38 |
|
|
* Returns the number of steps to run to update the datasource
|
39 |
|
|
* to the schema this schema updater is updating to.
|
40 |
|
|
* This includes needed steps in previous updaters.
|
41 |
7747019c
|
Andreas Müller
|
* @param caseType
|
42 |
1d36aa54
|
Andreas Müller
|
* @see #getPreviousUpdater()
|
43 |
|
|
* @return number of steps
|
44 |
|
|
*/
|
45 |
7747019c
|
Andreas Müller
|
int countSteps(ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType);
|
46 |
1d36aa54
|
Andreas Müller
|
|
47 |
|
|
|
48 |
7747019c
|
Andreas Müller
|
public boolean invoke(ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType) throws Exception;
|
49 |
1d36aa54
|
Andreas Müller
|
|
50 |
7747019c
|
Andreas Müller
|
public boolean invoke(String targetVersion, ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType) throws Exception;
|
51 |
1d36aa54
|
Andreas Müller
|
|
52 |
|
|
}
|