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
|
* Class which represents a CDM schema version step. See {@link CdmUpdater}
|
16
|
* for further documentation or implementing classes for examples.
|
17
|
*
|
18
|
* @see CdmUpdater
|
19
|
* @see ISchemaUpdaterStep
|
20
|
* @see ISchemaUpdater
|
21
|
* @see ITermUpdaterStep
|
22
|
*
|
23
|
* @author a.mueller
|
24
|
* @date 09.2010
|
25
|
*/
|
26
|
public interface ISchemaUpdater extends IUpdater<ISchemaUpdater>{
|
27
|
|
28
|
/**
|
29
|
* Invokes this CDM schema updater and updates the schema up to the current CDM
|
30
|
* schema version. Throws an exception if this updater's target version does
|
31
|
* not equal the current CDM schema version.
|
32
|
* @param datasource the datasource
|
33
|
* @param monitor the progress monitor and event listener
|
34
|
* @param caseType the
|
35
|
* @return
|
36
|
* @throws Exception
|
37
|
*/
|
38
|
public boolean invoke(ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType) throws Exception;
|
39
|
|
40
|
|
41
|
|
42
|
/**
|
43
|
* Invokes this CDM schema updater and updates the schema up to the given
|
44
|
* target version. Throws an exception if this updaters target version does
|
45
|
* not equal the given target version.
|
46
|
* @param targetVersion
|
47
|
* @param datasource the datasource
|
48
|
* @param monitor the progress monitor and event listener
|
49
|
* @return
|
50
|
* @throws Exception
|
51
|
*/
|
52
|
public boolean invoke(String targetVersion, ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType) throws Exception;
|
53
|
|
54
|
public String getTargetVersion();
|
55
|
|
56
|
}
|