Package com.atlassian.sal.api.upgrade
Interface PluginUpgradeTask
public interface PluginUpgradeTask
A task that needs to be executed to upgrade the existing data
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionPerform the upgrade task.int
-
Method Details
-
getBuildNumber
int getBuildNumber()- Returns:
- The new build number that this upgrade will upgrade to
Build number is specified in atlassian-plugin.xml inside <plugin-info> element. eg:
<param name="build">1</param>
-
getShortDescription
- Returns:
- A short (under 50 chars) description of the upgrade action
-
doUpgrade
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.- Returns:
- a collection of warnings about the upgrade
- Throws:
Exception- if the upgrade fails
-
getPluginKey
- 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
-