|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.upgrade.AbstractUpgradeManager
public abstract class AbstractUpgradeManager
Field Summary |
---|
Fields inherited from interface com.atlassian.confluence.upgrade.UpgradeManager |
---|
MINIMUM_SUPPORTED_UPGRADE_BUILD_NUMBER, MINIMUM_SUPPORTED_UPGRADE_VERSION |
Constructor Summary | |
---|---|
AbstractUpgradeManager()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
boolean |
configuredBuildNumberNewerThan(java.lang.String buildNumber)
Returns true if the passed build number is less than the configured build number - that is, the version of the currently running Confluence is newer than the version passed. |
void |
entireUpgradeFinished()
Called when all immediate and deferred upgrade actions have been performed *if* an upgrade was needed. |
protected java.util.List<UpgradeTask> |
getAllUpgradeTasks()
|
protected java.lang.String |
getConfiguredBuildNumber()
|
protected abstract java.lang.String |
getDatabaseBuildNumber()
|
java.util.List<UpgradeError> |
getErrors()
|
java.lang.String |
getExportBuildNumber(boolean isSpaceExport)
Tells the earliest version the exports will be compatible with. |
java.lang.String |
getOldestSpaceImportAllowed()
Calculates the oldest build number from which a space can be imported. |
java.util.List<DeferredUpgradeTask> |
getPluginDependentUpgradeTasks()
|
java.util.Map<java.lang.String,PluginExportCompatibility> |
getPluginExportCompatibility(boolean isSpaceExport)
Returns the list of plugins with data (especially plugins with Active Objects data) and tells how backward-compatible they are. |
java.util.List<UpgradeTask> |
getPreSchemaUpgradeTasks()
|
protected abstract java.lang.String |
getRealBuildNumber()
|
java.util.List<UpgradeTask> |
getSchemaUpgradeTasks()
|
java.util.List<UpgradeTask> |
getUpgradeTasks()
|
protected java.util.List<UpgradeTask> |
getUpgradeTasksToRun()
|
protected void |
initialUpgradeFinished()
Once all upgrade tasks have been completed without error, make sure the build number stored in the applications main configuration file and database now matches the build number of this version of the release. |
boolean |
isUpgraded()
|
boolean |
needUpgrade()
|
protected boolean |
permitDatabaseUpgrades()
This is used to guard against database upgrades being performed multiple times on the same database. |
protected void |
postUpgrade()
|
protected abstract java.util.List<UpgradeError> |
runUpgradePrerequisites()
Runs all upgrade prerequisites. |
void |
setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
|
protected void |
setConfiguredBuildNumber(java.lang.String buildNumber)
|
protected abstract void |
setDatabaseBuildNumber(java.lang.String databaseBuildNumber)
Once the upgrade is complete, we'll need to set the new database build number in the database. |
void |
setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
|
void |
setPluginDependentUpgradeTasks(java.util.List<DeferredUpgradeTask> upgradeTasks)
|
void |
setPreSchemaUpgradeTasks(java.util.List<UpgradeTask> preSchemaUpgradeTasks)
|
void |
setSchemaHelper(SchemaHelper schemaHelper)
|
void |
setSchemaUpgradeTasks(java.util.List<UpgradeTask> upgradeTasks)
|
void |
setUpgradeTasks(java.util.List<UpgradeTask> upgradeTasks)
|
boolean |
taskNewerThan(java.lang.String buildNumber,
UpgradeTask upgradeTask)
Returns true if the build number for the task is greater than the passed build number. |
void |
upgrade(com.atlassian.johnson.JohnsonEventContainer agentJohnson)
|
protected void |
upgradeStarted()
|
protected void |
upgradeTaskSucceeded(UpgradeTask upgradeTask)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeManager |
---|
setDatabaseBuildNumber |
Constructor Detail |
---|
public AbstractUpgradeManager()
Method Detail |
---|
public void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
public void setSchemaHelper(SchemaHelper schemaHelper)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void upgrade(com.atlassian.johnson.JohnsonEventContainer agentJohnson) throws UpgradeException
upgrade
in interface UpgradeManager
UpgradeException
protected java.util.List<UpgradeTask> getAllUpgradeTasks()
protected java.util.List<UpgradeTask> getUpgradeTasksToRun()
protected void upgradeTaskSucceeded(UpgradeTask upgradeTask) throws java.lang.Exception
java.lang.Exception
protected void upgradeStarted()
public java.util.List<UpgradeTask> getPreSchemaUpgradeTasks()
public void setPreSchemaUpgradeTasks(java.util.List<UpgradeTask> preSchemaUpgradeTasks)
public void setUpgradeTasks(java.util.List<UpgradeTask> upgradeTasks)
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
public java.util.List<UpgradeTask> getUpgradeTasks()
public void setSchemaUpgradeTasks(java.util.List<UpgradeTask> upgradeTasks)
public java.util.List<UpgradeTask> getSchemaUpgradeTasks()
public java.util.List<UpgradeError> getErrors()
getErrors
in interface UpgradeManager
public void setPluginDependentUpgradeTasks(java.util.List<DeferredUpgradeTask> upgradeTasks)
public java.util.List<DeferredUpgradeTask> getPluginDependentUpgradeTasks()
protected abstract java.util.List<UpgradeError> runUpgradePrerequisites()
protected java.lang.String getConfiguredBuildNumber()
protected void setConfiguredBuildNumber(java.lang.String buildNumber) throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationException
public boolean needUpgrade()
needUpgrade
in interface UpgradeManager
public boolean configuredBuildNumberNewerThan(java.lang.String buildNumber)
UpgradeManager
configuredBuildNumberNewerThan
in interface UpgradeManager
public boolean taskNewerThan(java.lang.String buildNumber, UpgradeTask upgradeTask)
UpgradeManager
taskNewerThan
in interface UpgradeManager
protected void initialUpgradeFinished() throws java.lang.Exception
java.lang.Exception
- when setting the database or configuration build number failspublic void entireUpgradeFinished()
UpgradeManager
entireUpgradeFinished
in interface UpgradeManager
protected abstract java.lang.String getRealBuildNumber()
protected abstract java.lang.String getDatabaseBuildNumber()
getConfiguredBuildNumber()
.protected abstract void setDatabaseBuildNumber(java.lang.String databaseBuildNumber) throws java.lang.Exception
databaseBuildNumber
- The new database build number
java.lang.Exception
- when there is any problem setting the database build numberprotected boolean permitDatabaseUpgrades() throws UpgradeException
UpgradeException
- If the implementation of this method encounters any errors.protected void postUpgrade()
public boolean isUpgraded()
isUpgraded
in interface UpgradeManager
public java.lang.String getOldestSpaceImportAllowed()
UpgradeManager
getOldestSpaceImportAllowed
in interface UpgradeManager
public java.lang.String getExportBuildNumber(boolean isSpaceExport)
UpgradeManager
getExportBuildNumber
in interface UpgradeManager
isSpaceExport
- true if the export is about a space, false for a global export.
public java.util.Map<java.lang.String,PluginExportCompatibility> getPluginExportCompatibility(boolean isSpaceExport)
UpgradeManager
Returns the list of plugins with data (especially plugins with Active Objects data) and tells how backward-compatible they are.
If at least one plugin isn't compatible, the importer silently doesn't import any data.
What is a compatible version?
The data is exported as-is in XML and reimported in an earlier version. If the earlier version of the plugin is able to read the data without fault, then it is compatible. Note that there is no downgrade task, obviously.
getPluginExportCompatibility
in interface UpgradeManager
isSpaceExport
- true if the export is about a space, false for a global export.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |