com.xpn.xwiki.store.migration
Interface DataMigrationManager

All Known Implementing Classes:
AbstractDataMigrationManager, HibernateDataMigrationManager

@Role
public interface DataMigrationManager

Interface for all migration managers.

Since:
3.4M1
Version:
$Id: 22ca23c8efd5907ac243090ca1f529ef040627bc $

Method Summary
 void checkDatabase()
          Check current database version and proceed to migrations.
 DataMigrationStatus getDataMigrationStatus()
           
 XWikiDBVersion getDBVersion()
           
 XWikiDBVersion getLatestVersion()
           
 void initNewDB()
          Setup the schema of a new DB and set it to the latest version (not running migrations).
 

Method Detail

getDBVersion

XWikiDBVersion getDBVersion()
                            throws DataMigrationException
Returns:
current DB version or null for a new database
Throws:
DataMigrationException - if any error

getDataMigrationStatus

DataMigrationStatus getDataMigrationStatus()
                                           throws DataMigrationException
Returns:
current DB migration status or null for a new database
Throws:
DataMigrationException - if any error
Since:
4.4.1

checkDatabase

void checkDatabase()
                   throws MigrationRequiredException,
                          DataMigrationException
Check current database version and proceed to migrations. Migration is processed only once, and depends on the following configuration:

Throws:
MigrationRequiredException - when version is incompatible with current version
DataMigrationException - when an error occurs during check.

getLatestVersion

XWikiDBVersion getLatestVersion()
Returns:
latest DB version
Since:
3.4M1

initNewDB

void initNewDB()
               throws DataMigrationException
Setup the schema of a new DB and set it to the latest version (not running migrations). This should be used on a newly created DB only

Throws:
DataMigrationException - if any error
Since:
3.4M1


Copyright © 2004-2013 XWiki. All Rights Reserved.