com.atlassian.sal.core.upgrade
Class DefaultPluginUpgradeManager
java.lang.Object
com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager
- All Implemented Interfaces:
- LifecycleAware, PluginUpgradeManager, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
public class DefaultPluginUpgradeManager
- extends Object
- implements PluginUpgradeManager, LifecycleAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Processes plugin upgrade operations.
Upgrades are triggered by the start lifecycle event, and plugin enabled.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPluginUpgradeManager
public DefaultPluginUpgradeManager(List<PluginUpgradeTask> upgradeTasks,
TransactionTemplate transactionTemplate,
com.atlassian.plugin.PluginAccessor pluginAccessor,
PluginSettingsFactory pluginSettingsFactory,
com.atlassian.plugin.event.PluginEventManager pluginEventManager)
onBind
@Deprecated
public void onBind(PluginUpgradeTask task,
Map props)
- Deprecated.
- Notifies the plugin upgrade manager that a plugin update tasks has been registered.
This method does nothing but logging at the moment. Is is now deprecated since it could result in circular
dependency when trying to bind already exposed update tasks to plugin manager that is being created.
- Parameters:
task - the upgrade task that is being boundprops - the set of properties that the upgrade task was registered with
onStart
public void onStart()
- Specified by:
onStart in interface LifecycleAware
onPluginEnabled
public void onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event)
getUpgradeTasks
protected Map<String,List<PluginUpgradeTask>> getUpgradeTasks()
- Returns:
- map of all upgrade tasks (stored by pluginKey)
upgrade
public List<Message> upgrade()
- Specified by:
upgrade in interface PluginUpgradeManager
upgradeInternal
public List<Message> upgradeInternal()
upgradeInternal
public List<Message> upgradeInternal(com.atlassian.plugin.Plugin plugin)
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
- Throws:
Exception
Copyright © 2011 Atlassian. All Rights Reserved.