public class IsUpgradeInProgressCondition extends AbstractWebCondition implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
true
when an upgrade is in progress.
The implementation is optimized so that the ClusterUpgradeStateManager
is not queried every time, instead
it keeps the state internal and reacts to JiraUpgradeStartedEvent
, JiraUpgradeCancelledEvent
and
JiraUpgradeFinishedEvent
to keep it up to date.Constructor and Description |
---|
IsUpgradeInProgressCondition(ClusterUpgradeStateManager clusterStateManager,
com.atlassian.event.api.EventPublisher eventPublisher,
ClusterMessagingService clusterMessagingService) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
void |
init(Map<String,String> params) |
void |
onUpgradeCancelled(JiraUpgradeCancelledEvent event) |
void |
onUpgradeFinished(JiraUpgradeFinishedEvent event) |
void |
onUpgradeStarted(JiraUpgradeStartedEvent event) |
boolean |
shouldDisplay(ApplicationUser applicationUser,
JiraHelper jiraHelper) |
getApplicationUser, shouldDisplay
@Inject public IsUpgradeInProgressCondition(ClusterUpgradeStateManager clusterStateManager, com.atlassian.event.api.EventPublisher eventPublisher, ClusterMessagingService clusterMessagingService)
public void init(Map<String,String> params) throws com.atlassian.plugin.PluginParseException
init
in interface com.atlassian.plugin.web.Condition
init
in class AbstractWebCondition
com.atlassian.plugin.PluginParseException
public boolean shouldDisplay(ApplicationUser applicationUser, JiraHelper jiraHelper)
shouldDisplay
in class AbstractWebCondition
@EventListener public void onUpgradeStarted(JiraUpgradeStartedEvent event)
@EventListener public void onUpgradeFinished(JiraUpgradeFinishedEvent event)
public void onUpgradeCancelled(JiraUpgradeCancelledEvent event)
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
Copyright © 2002-2024 Atlassian. All Rights Reserved.