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
 Collection<Message> doUpgrade()
          Perform the upgrade task.
 int getBuildNumber()
           
 String getPluginKey()
           
 String getShortDescription()
           
 

Method Detail

getBuildNumber

int getBuildNumber()
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

String getShortDescription()
Returns:
A short (<50 chars) description of the upgrade action

doUpgrade

Collection<Message> doUpgrade()
                              throws Exception
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

String 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


Copyright © 2011 Atlassian. All Rights Reserved.