public interface

PluginUpgradeTask

com.atlassian.sal.api.upgrade.PluginUpgradeTask

Class Overview

A task that needs to be executed to upgrade the existing data

Summary

Public Methods
abstract Collection<Message> doUpgrade()
Perform the upgrade task.
abstract int getBuildNumber()
abstract String getPluginKey()
abstract String getShortDescription()

Public Methods

public abstract Collection<Message> 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

public abstract 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>

public abstract 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

public abstract String getShortDescription ()

Returns
  • A short (