@Component @Named(value="hibernate") @Singleton public class HibernateDataMigrationManager extends AbstractDataMigrationManager
AbstractDataMigrationManager.XWikiMigration
componentManager, hibernateConfiguration, logger, migrations, observationManager, progress
Constructor and Description |
---|
HibernateDataMigrationManager() |
Modifier and Type | Method and Description |
---|---|
protected List<? extends DataMigration> |
getAllMigrations() |
XWikiHibernateBaseStore |
getBaseStore() |
XWikiDBVersion |
getDBVersionFromDatabase()
Read data version from database.
|
protected void |
initializeEmptyDB() |
protected void |
setDBVersionToDatabase(XWikiDBVersion version) |
protected void |
startMigrations()
Start the migration process.
|
protected void |
updateSchema(Collection<AbstractDataMigrationManager.XWikiMigration> migrations)
Update database schema to the latest structure.
|
checkDatabase, getDataMigrationStatus, getDBVersion, getDBVersionFromConfig, getForcedMigrations, getLatestVersion, getMainXWiki, getNeededMigrations, getVirtualWikisDatabaseNames, getXWikiConfig, getXWikiContext, initialize, initNewDB, isVirtualMode, setDBVersion, startMigrations
public XWikiHibernateBaseStore getBaseStore() throws DataMigrationException
DataMigrationException
- if the store could not be reachedpublic XWikiDBVersion getDBVersionFromDatabase() throws DataMigrationException
AbstractDataMigrationManager
getDBVersionFromDatabase
in class AbstractDataMigrationManager
DataMigrationException
- in case of an unexpected errorprotected void initializeEmptyDB() throws DataMigrationException
initializeEmptyDB
in class AbstractDataMigrationManager
DataMigrationException
- if any errorprotected void setDBVersionToDatabase(XWikiDBVersion version) throws DataMigrationException
setDBVersionToDatabase
in class AbstractDataMigrationManager
version
- to setDataMigrationException
- if any errorprotected void updateSchema(Collection<AbstractDataMigrationManager.XWikiMigration> migrations) throws DataMigrationException
AbstractDataMigrationManager
updateSchema
in class AbstractDataMigrationManager
migrations
- the migration that will be executed (since 4.0M1)DataMigrationException
- if any errorprotected void startMigrations() throws DataMigrationException
AbstractDataMigrationManager
startMigrations
in class AbstractDataMigrationManager
DataMigrationException
- in case of any errorprotected List<? extends DataMigration> getAllMigrations() throws DataMigrationException
getAllMigrations
in class AbstractDataMigrationManager
DataMigration
for this managerDataMigrationException
- if any errorCopyright © 2004–2021 XWiki. All rights reserved.