public class DefaultPluginUpgradeManager extends Object implements PluginUpgradeManager, LifecycleAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
| 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() |
void |
destroy() |
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.
|
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()
LifecycleAwareonStart in interface LifecycleAwarepublic void onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event)
protected Map<String,List<PluginUpgradeTask>> getUpgradeTasks()
public List<Message> upgrade()
PluginUpgradeManagerupgrade in interface PluginUpgradeManagerpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionCopyright © 2015 Atlassian. All rights reserved.