com.atlassian.confluence.upgrade
Interface UpgradeManager

All Known Implementing Classes:
AbstractUpgradeManager, DefaultUpgradeManager

public interface UpgradeManager

UpgradeManager is responsible for creating a list of UpgradeTasks. For simple upgrades (standard version build 20 to standard version build 21, for example) it's a simple list for that kind of version. A more sophisticated one (upgrade from standard to enterprise version, for example) can be modeled as a composite subclass of two UpgradeManagers. Note that all license specific code is strictly put into the corresponding subclass, so whatever check for enterprise license or things like that is in a specific subclass and not in form of if(enterprise) do blah code spread here and there.


Field Summary
static int MINIMUM_SUPPORTED_UPGRADE_BUILD_NUMBER
          The lowest build number we will attempt to upgrade from.
static String MINIMUM_SUPPORTED_UPGRADE_VERSION
          The Confluence version corresponding to the mimumum supported upgrade build number.
 
Method Summary
 boolean configuredBuildNumberNewerThan(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.
 List<UpgradeError> getErrors()
           
 boolean isUpgraded()
           
 boolean needUpgrade()
           
 boolean taskNewerThan(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)
           
 

Field Detail

MINIMUM_SUPPORTED_UPGRADE_BUILD_NUMBER

static final int MINIMUM_SUPPORTED_UPGRADE_BUILD_NUMBER
The lowest build number we will attempt to upgrade from. Any upgrade from a build prior to this number will fail, and a Johnson event will be posted explaining why the upgrade could not be performed.

See Also:
Constant Field Values

MINIMUM_SUPPORTED_UPGRADE_VERSION

static final String MINIMUM_SUPPORTED_UPGRADE_VERSION
The Confluence version corresponding to the mimumum supported upgrade build number. This is only used to provide user-friendly error messages.

See Also:
Constant Field Values
Method Detail

upgrade

void upgrade(com.atlassian.johnson.JohnsonEventContainer agentJohnson)
             throws UpgradeException
Throws:
UpgradeException

getErrors

List<UpgradeError> getErrors()

needUpgrade

boolean needUpgrade()

isUpgraded

boolean isUpgraded()
Returns:
true if the UpgradeManager was able to successfully upgrade this instance, or if no upgrade was necessary; otherwise false.

configuredBuildNumberNewerThan

boolean configuredBuildNumberNewerThan(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.


taskNewerThan

boolean taskNewerThan(String buildNumber,
                      UpgradeTask upgradeTask)
Returns true if the build number for the task is greater than the passed build number. Usually indicates that the task should run as part of an upgrade.


entireUpgradeFinished

void entireUpgradeFinished()
Called when all immediate and deferred upgrade actions have been performed *if* an upgrade was needed.



Copyright © 2003-2013 Atlassian. All Rights Reserved.