Project

General

Profile

Download (1.48 KB) Statistics
| Branch: | Tag: | Revision:
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
 * Common interface for {@link ISchemaUpdater} and {@link ITermUpdater}
16
 *
17
 * @author a.mueller
18
 * @since 16.11.2010
19
 */
20
public interface IUpdater<U extends IUpdater<U>> {
21

    
22

    
23
	/**
24
	 * Returns the previous CDM term/schema updater
25
	 * @return
26
	 */
27
	public U getPreviousUpdater();
28

    
29
	/**
30
	 * Returns the next CDM term/schema updater
31
	 * @return
32
	 */
33
	public U getNextUpdater();
34

    
35

    
36
	/**
37
	 * Returns the number of steps to run to update the datasource
38
	 * to the schema this schema updater is updating to.
39
	 * This includes needed steps in previous updaters.
40
	 * @param caseType
41
	 * @see #getPreviousUpdater()
42
	 * @return number of steps
43
	 */
44
	int countSteps(ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType);
45

    
46

    
47
	public void invoke(ICdmDataSource datasource, IProgressMonitor monitor,
48
	        CaseType caseType, SchemaUpdateResult result) throws Exception;
49

    
50
	public void invoke(String targetVersion, ICdmDataSource datasource,
51
	        IProgressMonitor monitor, CaseType caseType, SchemaUpdateResult result) throws Exception;
52

    
53
}
(13-13/35)