Project

General

Profile

Download (1.41 KB) Statistics
| Branch: | Tag: | Revision:
1 1d36aa54 Andreas Müller
/**
2
* Copyright (C) 2009 EDIT
3 ba35e2f8 Andreas Müller
* European Distributed Institute of Taxonomy
4 1d36aa54 Andreas Müller
* http://www.e-taxonomy.eu
5 ba35e2f8 Andreas Müller
*
6 1d36aa54 Andreas Müller
* 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 bd1d3bee Andreas Müller
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
12 1d36aa54 Andreas Müller
import eu.etaxonomy.cdm.database.ICdmDataSource;
13
14
/**
15 dbc89ca1 Andreas Müller
 * Interface for {@link ISchemaUpdater}.
16
 * Originally also for and ITermUpdater which does not exist anymore.
17 ba35e2f8 Andreas Müller
 *
18 1d36aa54 Andreas Müller
 * @author a.mueller
19 53db84af Andreas Müller
 * @since 16.11.2010
20 1d36aa54 Andreas Müller
 */
21 b8833305 Andreas Müller
public interface IUpdater<U extends IUpdater<U>> {
22 ba35e2f8 Andreas Müller
23 1d36aa54 Andreas Müller
	/**
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 ba35e2f8 Andreas Müller
	 * @param caseType
34 1d36aa54 Andreas Müller
	 * @see #getPreviousUpdater()
35
	 * @return number of steps
36
	 */
37 7747019c Andreas Müller
	int countSteps(ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType);
38 ba35e2f8 Andreas Müller
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 1d36aa54 Andreas Müller
46
}