minor
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / database / update / ISchemaUpdater.java
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 * @author a.mueller
17 * @date 09.2010
18 *
19 */
20 public interface ISchemaUpdater extends IUpdater<ISchemaUpdater>{
21
22 /**
23 * Invokes this CDM schema updater and updates the schema up to the current CDM
24 * schema version. Throws an exception if this updater's target version does
25 * not equal the current CDM schema version.
26 * @param datasource the datasource
27 * @param monitor the progress monitor and event listener
28 * @param caseType the
29 * @return
30 * @throws Exception
31 */
32 public boolean invoke(ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType) throws Exception;
33
34
35
36 /**
37 * Invokes this CDM schema updater and updates the schema up to the given
38 * target version. Throws an exception if this updaters target version does
39 * not equal the given target version.
40 * @param targetVersion
41 * @param datasource the datasource
42 * @param monitor the progress monitor and event listener
43 * @return
44 * @throws Exception
45 */
46 public boolean invoke(String targetVersion, ICdmDataSource datasource, IProgressMonitor monitor, CaseType caseType) throws Exception;
47
48 public String getTargetVersion();
49
50 }