|
||||||||||
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 | |
---|---|
protected Comparator<String> |
buildNumberComp
|
Constructor Summary | |
---|---|
AbstractUpgradeManager()
|
Method Summary | |
---|---|
protected void |
doUpgrade()
Runs required upgrade tasks. |
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 |
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 List<String> |
runUpgradePrerequisites()
Runs all upgrade prerequisites. |
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 |
setSchemaHelper(SchemaHelper schemaHelper)
|
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 |
upgradeTaskSucceeded(UpgradeTask upgradeTask)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Comparator<String> buildNumberComp
Constructor Detail |
---|
public AbstractUpgradeManager()
Method Detail |
---|
public void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
public void setSchemaHelper(SchemaHelper schemaHelper)
public void upgrade(com.atlassian.johnson.JohnsonEventContainer agentJohnson) throws UpgradeException
upgrade
in interface UpgradeManager
UpgradeException
protected void doUpgrade() throws Throwable
UpgradeTask.getErrors()
. Updates the configured build number after each successful task. Updates
the database build number after each database upgrade task.
Throwable
- if anything is thrown by an upgrade task (or anything else throws a Throwable
of course)
UpgradeException
- if an upgrade task throws an UpgradeException
or lists any errors after
execution. Such errors will be made available in getErrors()
protected void upgradeSchema() throws com.atlassian.config.ConfigurationException, UpgradeException
com.atlassian.config.ConfigurationException
UpgradeException
protected void upgradeTaskSucceeded(UpgradeTask upgradeTask) throws Exception
Exception
protected void upgradeStarted() throws Exception
Exception
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 UpgradeManager
protected abstract List<String> runUpgradePrerequisites()
protected String getConfiguredBuildNumber()
protected void setConfiguredBuildNumber(String buildNumber) throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationException
public boolean needUpgrade()
needUpgrade
in interface UpgradeManager
protected void upgradeFinished() throws Exception
Exception
protected abstract String getRealBuildNumber()
protected abstract String getDatabaseBuildNumber()
getConfiguredBuildNumber()
.
protected abstract void setDatabaseBuildNumber(String databaseBuildNumber) throws Exception
Exception
protected boolean permitDatabaseUpgrades() throws UpgradeException
UpgradeException
protected void postUpgrade()
public boolean isUpgraded()
isUpgraded
in interface UpgradeManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |