Project

General

Profile

Download (1.43 KB) Statistics
| Branch: | Tag: | Revision:
1
// $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
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
13
import eu.etaxonomy.cdm.database.ICdmDataSource;
14

    
15
/**
16
 * Common interface for {@link ISchemaUpdater} and {@link ITermUpdater}
17
 * 
18
 * @author a.mueller
19
 * @date 16.11.2010
20
 */
21
public interface IUpdater<U extends IUpdater<U>> {
22
	
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
	 * @param caseType 
42
	 * @see #getPreviousUpdater()
43
	 * @return number of steps
44
	 */
45
	int countSteps(ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType);
46
	
47
	
48
	public boolean invoke(ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType) throws Exception;
49
		
50
	public boolean invoke(String targetVersion, ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType) throws Exception;
51

    
52
}
(15-15/34)