com.atlassian.confluence.upgrade.upgradetask
Class ConditionallyEnableMailArchivePluginUpgradeTask

java.lang.Object
  extended by com.atlassian.confluence.upgrade.AbstractUpgradeTask
      extended by com.atlassian.confluence.upgrade.AbstractDeferredRunUpgradeTask
          extended by com.atlassian.confluence.upgrade.upgradetask.ConditionallyEnableMailArchivePluginUpgradeTask
All Implemented Interfaces:
BackupSupport, DeferredUpgradeTask, UpgradeTask, UpgradeTaskInfo, org.springframework.beans.factory.BeanNameAware

public class ConditionallyEnableMailArchivePluginUpgradeTask
extends AbstractDeferredRunUpgradeTask

The mail archive feature is now packaged as a plugin and disabled by default. This upgrade task will detect if the database contains archived mail and manually enable the plugin.


Constructor Summary
ConditionallyEnableMailArchivePluginUpgradeTask(org.springframework.transaction.PlatformTransactionManager transactionManager, net.sf.hibernate.SessionFactory sessionFactory, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.PluginController pluginController)
           
 
Method Summary
 boolean breaksBackwardCompatibility()
          The only action of this task is to enable the Mail plugin, which is backwards-compatible.
 void doDeferredUpgrade()
          Run the upgrade that was deferred by an earlier call to doUpgrade.
 String getBuildNumber()
           
 Collection<UpgradeError> getErrors()
          Return any errors that occur.
 String getShortDescription()
          A short (<50 chars) description of the upgrade action
 boolean runOnSpaceImport()
          This upgrade task doesn't modify space-level information
 
Methods inherited from class com.atlassian.confluence.upgrade.AbstractDeferredRunUpgradeTask
doUpgrade, isUpgradeRequired, setUpgradeRequired
 
Methods inherited from class com.atlassian.confluence.upgrade.AbstractUpgradeTask
addAllErrors, addError, addError, getConstraint, getName, isDatabaseUpgrade, setBeanName, setBuildNumber, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeTask
getConstraint, validate
 
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeTaskInfo
getName, isDatabaseUpgrade
 

Constructor Detail

ConditionallyEnableMailArchivePluginUpgradeTask

public ConditionallyEnableMailArchivePluginUpgradeTask(org.springframework.transaction.PlatformTransactionManager transactionManager,
                                                       net.sf.hibernate.SessionFactory sessionFactory,
                                                       com.atlassian.plugin.PluginAccessor pluginAccessor,
                                                       com.atlassian.plugin.PluginController pluginController)
Method Detail

doDeferredUpgrade

public void doDeferredUpgrade()
                       throws Exception
Description copied from interface: DeferredUpgradeTask
Run the upgrade that was deferred by an earlier call to doUpgrade.

Throws:
Exception

getBuildNumber

public String getBuildNumber()
Specified by:
getBuildNumber in interface UpgradeTaskInfo
Overrides:
getBuildNumber in class AbstractUpgradeTask
Returns:
The build number that this upgrade is applicable to

getShortDescription

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

Specified by:
getShortDescription in interface UpgradeTaskInfo
Overrides:
getShortDescription in class AbstractUpgradeTask

breaksBackwardCompatibility

public boolean breaksBackwardCompatibility()
The only action of this task is to enable the Mail plugin, which is backwards-compatible.


runOnSpaceImport

public boolean runOnSpaceImport()
This upgrade task doesn't modify space-level information


getErrors

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

Specified by:
getErrors in interface UpgradeTask
Overrides:
getErrors in class AbstractUpgradeTask
Returns:
a collection of UpgradeError objects, sometimes null.


Copyright © 2003–2015 Atlassian. All rights reserved.