public abstract class AbstractUpgradeManager extends Object implements UpgradeManager
| Modifier and Type | Field and Description |
|---|---|
protected Comparator |
buildNumberComp |
protected static org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
AbstractUpgradeManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doUpgrade() |
protected String |
getConfiguredBuildNumber()
This is the build number of the current version that the user is running under.
|
protected abstract String |
getDatabaseBuildNumber()
This is the build number of the data in the database.
|
List<UpgradeError> |
getErrors() |
protected abstract String |
getRealBuildNumber()
The is the build number of the new version of Confluence being upgraded to.
|
List<UpgradeTask> |
getSchemaUpgradeTasks() |
List<UpgradeTask> |
getUpgradeTasks() |
boolean |
isUpgradeAllowed() |
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() |
void |
setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig) |
protected void |
setConfiguredBuildNumber(String buildNumber) |
protected abstract void |
setDatabaseBuildNumber(String databaseBuildNumber)
Once the upgrade is complete, we'll need to set the new database build number in the database.
|
void |
setPreSchemaUpgradeTasks(List<UpgradeTask> preSchemaUpgradeTasks) |
void |
setSchemaUpgradeTasks(List<UpgradeTask> upgradeTasks) |
void |
setUpgradeTasks(List<UpgradeTask> upgradeTasks) |
void |
upgrade(com.atlassian.johnson.JohnsonEventContainer agentJohnson) |
protected void |
upgradeFinished()
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.
|
protected void |
upgradeSchema() |
protected void |
upgradeStarted() |
protected void |
upgradeTaskFailed(UpgradeTask upgradeTask,
Throwable e) |
protected void |
upgradeTaskSucceeded(UpgradeTask upgradeTask) |
protected static final org.apache.log4j.Logger log
protected final Comparator buildNumberComp
public void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
public void upgrade(com.atlassian.johnson.JohnsonEventContainer agentJohnson)
throws UpgradeException
upgrade in interface UpgradeManagerUpgradeExceptionprotected void upgradeSchema()
throws com.atlassian.config.ConfigurationException,
UpgradeException
com.atlassian.config.ConfigurationExceptionUpgradeExceptionprotected void upgradeTaskSucceeded(UpgradeTask upgradeTask) throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationExceptionprotected void upgradeTaskFailed(UpgradeTask upgradeTask, Throwable e)
public void setPreSchemaUpgradeTasks(List<UpgradeTask> preSchemaUpgradeTasks)
public void setUpgradeTasks(List<UpgradeTask> upgradeTasks)
public List<UpgradeTask> getUpgradeTasks()
public void setSchemaUpgradeTasks(List<UpgradeTask> upgradeTasks)
public List<UpgradeTask> getSchemaUpgradeTasks()
public List<UpgradeError> getErrors()
getErrors in interface UpgradeManagerpublic boolean isUpgradeAllowed()
protected String getConfiguredBuildNumber()
protected void setConfiguredBuildNumber(String buildNumber) throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationExceptionpublic boolean needUpgrade()
needUpgrade in interface UpgradeManagerprotected void upgradeFinished()
throws Exception
Exceptionprotected abstract String getRealBuildNumber()
protected abstract String getDatabaseBuildNumber()
getConfiguredBuildNumber().protected abstract void setDatabaseBuildNumber(String databaseBuildNumber) throws Exception
Exceptionprotected boolean permitDatabaseUpgrades()
throws UpgradeException
UpgradeExceptionprotected void postUpgrade()
public boolean isUpgraded()
isUpgraded in interface UpgradeManagerCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.