com.atlassian.jira.upgrade
Class AbstractUpgradeTask

java.lang.Object
  extended by com.atlassian.jira.upgrade.AbstractUpgradeTask
All Implemented Interfaces:
UpgradeTask
Direct Known Subclasses:
AbstractFieldScreenUpgradeTask, AbstractNotificationSchemeUpgradeTask, AbstractReindexUpgradeTask, AbstractSearchRequestUpgradeTask, UpgradeTask_Build10, UpgradeTask_Build101, UpgradeTask_Build102, UpgradeTask_Build11, UpgradeTask_Build130, UpgradeTask_Build132, UpgradeTask_Build150, UpgradeTask_Build151, UpgradeTask_Build152, UpgradeTask_Build175, UpgradeTask_Build176, UpgradeTask_Build205, UpgradeTask_Build257, UpgradeTask_Build27, UpgradeTask_Build296, UpgradeTask_Build317, UpgradeTask_Build325, UpgradeTask_Build35, UpgradeTask_Build412, UpgradeTask_Build418, UpgradeTask_Build437, UpgradeTask_Build438, UpgradeTask_Build47, UpgradeTask_Build48, UpgradeTask_Build509, UpgradeTask_Build51, UpgradeTask_Build520, UpgradeTask_Build551, UpgradeTask_Build552, UpgradeTask_Build554, UpgradeTask_Build571, UpgradeTask_Build572, UpgradeTask_Build60, UpgradeTask_Build601, UpgradeTask_Build602, UpgradeTask_Build604, UpgradeTask_Build605, UpgradeTask_Build606, UpgradeTask_Build608, UpgradeTask_Build611, UpgradeTask_Build633, UpgradeTask_Build634, UpgradeTask_Build637, UpgradeTask_Build638, UpgradeTask_Build640, UpgradeTask_Build641, UpgradeTask_Build642, UpgradeTask_Build643, UpgradeTask_Build644, UpgradeTask_Build645, UpgradeTask_Build701, UpgradeTask_Build705, UpgradeTask_Build706, UpgradeTask_Build707, UpgradeTask_Build752, UpgradeTask_Build753, UpgradeTask_Build754, UpgradeTask_Build755, UpgradeTask_Build756, UpgradeTask_Build758, UpgradeTask_Build759, UpgradeTask_Build771, UpgradeTask_Build812, UpgradeTask_Build813, UpgradeTask_Build843, UpgradeTask1_2, UpgradeTask1_2_1

public abstract class AbstractUpgradeTask
extends Object
implements UpgradeTask


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.upgrade.UpgradeTask
UpgradeTask.Status
 
Constructor Summary
protected AbstractUpgradeTask(boolean reindexRequired)
           
 
Method Summary
protected  void addError(String error)
           
 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
protected  String convertToSchemaTableName(String tableName)
           
abstract  void doUpgrade(boolean setupMode)
          Perform the upgrade.
protected  ApplicationProperties getApplicationProperties()
           
abstract  String getBuildNumber()
           
protected  Connection getDatabaseConnection()
           
protected  org.ofbiz.core.entity.GenericDelegator getDelegator()
          Deprecated. 
 Collection<String> getErrors()
          Return any errors that occur.
protected  I18nHelper getI18nBean()
           
protected static OfBizDelegator getOfBizDelegator()
           
protected  String getSchemaName()
           
 String getShortDescription()
          A short (<50 chars) description of the upgrade action
 boolean isReindexRequired()
          Is a reindex required as a result of running this task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUpgradeTask

protected AbstractUpgradeTask(boolean reindexRequired)
Method Detail

isReindexRequired

public boolean isReindexRequired()
Description copied from interface: UpgradeTask
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.

Specified by:
isReindexRequired in interface UpgradeTask
Returns:
true if a reindex is required as a result of running this task.

getBuildNumber

public abstract String getBuildNumber()
Specified by:
getBuildNumber in interface UpgradeTask
Returns:
The build number that this upgrade is applicable to

doUpgrade

public abstract void doUpgrade(boolean setupMode)
                        throws Exception
Description copied from interface: UpgradeTask
Perform the upgrade.

Specified by:
doUpgrade in interface UpgradeTask
Parameters:
setupMode - Indicating this upgrade task is running during set up.
Throws:
Exception

getShortDescription

public String getShortDescription()
Description copied from interface: UpgradeTask
A short (<50 chars) description of the upgrade action

Specified by:
getShortDescription in interface UpgradeTask

getDelegator

@Deprecated
protected org.ofbiz.core.entity.GenericDelegator getDelegator()
Deprecated. 


getOfBizDelegator

protected static OfBizDelegator getOfBizDelegator()

getApplicationProperties

protected ApplicationProperties getApplicationProperties()

addError

protected void addError(String error)

addErrors

public void addErrors(String prefix,
                      Collection<String> errors)
Useful for adding a bunch of errors (like from a command) with a prefix


addErrors

public void addErrors(Collection<String> errors)

getErrors

public Collection<String> getErrors()
Description copied from interface: UpgradeTask
Return any errors that occur. Each entry is a string.

Specified by:
getErrors in interface UpgradeTask

getI18nBean

protected I18nHelper getI18nBean()

getDatabaseConnection

protected Connection getDatabaseConnection()

convertToSchemaTableName

protected String convertToSchemaTableName(String tableName)

getSchemaName

protected String getSchemaName()


Copyright © 2002-2013 Atlassian. All Rights Reserved.