public abstract class

AbstractUpgradeTask

extends Object
implements UpgradeTask
java.lang.Object
   ↳ com.atlassian.jira.upgrade.AbstractUpgradeTask
Known Direct Subclasses
Known Indirect Subclasses

Summary

Protected Constructors
AbstractUpgradeTask(boolean reindexRequired)
Public Methods
void addErrors(Collection<String> errors)
void addErrors(String prefix, Collection<String> errors)
Useful for adding a bunch of errors (like from a command) with a prefix
abstract void doUpgrade(boolean setupMode)
Perform the upgrade.
abstract String getBuildNumber()
Collection<String> getErrors()
Return any errors that occur.
boolean isReindexRequired()
Is a reindex required as a result of running this task.
Protected Methods
void addError(String error)
String convertToSchemaTableName(String tableName)
ApplicationProperties getApplicationProperties()
Connection getDatabaseConnection()
DatabaseType getDatabaseType()
@Deprecated GenericDelegator getDelegator()
static EntityEngine getEntityEngine()
I18nHelper getI18nBean()
static OfBizDelegator getOfBizDelegator()
String getSchemaName()
boolean isMSSQL()
boolean isMYSQL()
boolean isORACLE()
boolean isPostgreSQL()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.upgrade.UpgradeTask

Protected Constructors

protected AbstractUpgradeTask (boolean reindexRequired)

Public Methods

public void addErrors (Collection<String> errors)

public void addErrors (String prefix, Collection<String> errors)

Useful for adding a bunch of errors (like from a command) with a prefix

public abstract void doUpgrade (boolean setupMode)

Perform the upgrade.

Parameters
setupMode Indicating this upgrade task is running during set up.
Throws
Exception

public abstract String getBuildNumber ()

public Collection<String> getErrors ()

Return any errors that occur. Each entry is a string.

public boolean isReindexRequired ()

Is a reindex required as a result of running this task. If this method returns true the Upgrade manager will perform a reindex before completing. If an upgrade task changes data that is indexed by Lucene, e.g. the content of Issue fields then it should return true. A task need not necessarily change data to require a reindex but may return true here and do nothing else if there is a functional change to the code that requires the Lucene index to be rebuilt.

Returns
  • true if a reindex is required as a result of running this task.

Protected Methods

protected void addError (String error)

protected String convertToSchemaTableName (String tableName)

protected ApplicationProperties getApplicationProperties ()

protected Connection getDatabaseConnection ()

protected DatabaseType getDatabaseType ()

@Deprecated protected GenericDelegator getDelegator ()

protected static EntityEngine getEntityEngine ()

protected I18nHelper getI18nBean ()

protected static OfBizDelegator getOfBizDelegator ()

protected String getSchemaName ()

protected boolean isMSSQL ()

Throws
SQLException

protected boolean isMYSQL ()

Throws
SQLException

protected boolean isORACLE ()

Throws
SQLException

protected boolean isPostgreSQL ()