public class DefaultPluginUpgradeManager extends Object implements PluginUpgradeManager, LifecycleAware, org.springframework.beans.factory.InitializingBean
Modifier and Type | Field and Description |
---|---|
protected static String |
LOCK_TIMEOUT_PROPERTY |
protected static int |
LOCK_TIMEOUT_SECONDS |
Constructor and Description |
---|
DefaultPluginUpgradeManager(List<PluginUpgradeTask> upgradeTasks,
TransactionTemplate transactionTemplate,
com.atlassian.plugin.PluginAccessor pluginAccessor,
PluginSettingsFactory pluginSettingsFactory,
com.atlassian.plugin.event.PluginEventManager pluginEventManager,
com.atlassian.beehive.ClusterLockService clusterLockService) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected Map<String,List<PluginUpgradeTask>> |
getUpgradeTasks() |
void |
onBind(PluginUpgradeTask task,
Map props)
Deprecated.
as of 2.0.16 no longer used we now use the eventing framework to run upgrade tasks for plugins that are 'enabled', see
onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent) |
void |
onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event) |
void |
onStart()
Notification that the plugin is enabled and the application is started, including after being restored from backup.
|
void |
onStop()
Notification that the plugin is going to be stopped.
|
List<Message> |
upgrade()
Finds and upgrades all plugins, that implement PluginUpgradeTask
|
List<Message> |
upgradeInternal() |
List<Message> |
upgradeInternal(com.atlassian.plugin.Plugin plugin) |
protected static final String LOCK_TIMEOUT_PROPERTY
protected static final int LOCK_TIMEOUT_SECONDS
public DefaultPluginUpgradeManager(List<PluginUpgradeTask> upgradeTasks, TransactionTemplate transactionTemplate, com.atlassian.plugin.PluginAccessor pluginAccessor, PluginSettingsFactory pluginSettingsFactory, com.atlassian.plugin.event.PluginEventManager pluginEventManager, com.atlassian.beehive.ClusterLockService clusterLockService)
@Deprecated public void onBind(PluginUpgradeTask task, Map props)
onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent)
task
- the upgrade task that is being boundprops
- the set of properties that the upgrade task was registered withpublic void onStart()
LifecycleAware
onStart
in interface LifecycleAware
public void onStop()
LifecycleAware
Will be invoked if previously notified with LifecycleAware.onStart()
, before the plugin is disabled or framework is
shut down.
onStop
in interface LifecycleAware
public void onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event)
protected Map<String,List<PluginUpgradeTask>> getUpgradeTasks()
public List<Message> upgrade()
PluginUpgradeManager
upgrade
in interface PluginUpgradeManager
Copyright © 2015 Atlassian. All rights reserved.