com.atlassian.sal.ctk.test
Class PluginUpgradeManagerTest
java.lang.Object
com.atlassian.sal.ctk.test.PluginUpgradeManagerTest
- All Implemented Interfaces:
- PluginUpgradeTask, CtkTest
public class PluginUpgradeManagerTest
- extends Object
- implements CtkTest, PluginUpgradeTask
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PluginUpgradeManagerTest
public PluginUpgradeManagerTest(PluginUpgradeManager upgradeManager,
PluginSettingsFactory pluginSettingsFactory)
execute
public void execute(CtkTestResults results)
- Specified by:
execute in interface CtkTest
getBuildNumber
public int getBuildNumber()
- Specified by:
getBuildNumber in interface PluginUpgradeTask
- Returns:
- The new build number that this upgrade will upgrade to
Build number is specified in atlassian-plugin.xml inside element. eg:
<param name="build">1</param>
getShortDescription
public String getShortDescription()
- Specified by:
getShortDescription in interface PluginUpgradeTask
- Returns:
- A short (<50 chars) description of the upgrade action
doUpgrade
public Collection<Message> doUpgrade()
throws Exception
- Description copied from interface:
PluginUpgradeTask
- Perform the upgrade task. An exception should be thrown if the upgrade fails and cannot be recovered from. A
collection of error or warning messages should be returned if there a problems with the upgrade that are not
severe enough to halt the execution of the entire upgrade process. An exception should be thrown if the upgrade
process cannot continue.
- Specified by:
doUpgrade in interface PluginUpgradeTask
- Returns:
- a collection of warnings about the upgrade
- Throws:
Exception - if the upgrade fails
getPluginKey
public String getPluginKey()
- Specified by:
getPluginKey in interface PluginUpgradeTask
- Returns:
- key of the plugin that this upgrade task applies to.
Find the key as an attribute of top level element in atlassian-plugin.xml
Copyright © 2010 Atlassian. All Rights Reserved.