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
|
* @since 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
|
* @param result
|
36
|
* @return
|
37
|
* @throws Exception
|
38
|
*/
|
39
|
@Override
|
40
|
public void invoke(ICdmDataSource datasource, IProgressMonitor monitor,
|
41
|
CaseType caseType, SchemaUpdateResult result) throws Exception;
|
42
|
|
43
|
|
44
|
|
45
|
/**
|
46
|
* Invokes this CDM schema updater and updates the schema up to the given
|
47
|
* target version. Throws an exception if this updaters target version does
|
48
|
* not equal the given target version.
|
49
|
* @param targetVersion
|
50
|
* @param datasource the datasource
|
51
|
* @param monitor the progress monitor and event listener
|
52
|
* @result the accumlated result of the schema update
|
53
|
* @return
|
54
|
* @throws Exception
|
55
|
*/
|
56
|
@Override
|
57
|
public void invoke(String targetVersion, ICdmDataSource datasource,
|
58
|
IProgressMonitor monitor, CaseType caseType, SchemaUpdateResult result) throws Exception;
|
59
|
|
60
|
public String getTargetVersion();
|
61
|
|
62
|
}
|