Class IsUpgradeInProgressCondition
java.lang.Object
com.atlassian.jira.plugin.webfragment.conditions.AbstractWebCondition
com.atlassian.jira.plugin.adminupdates.conditions.IsUpgradeInProgressCondition
- All Implemented Interfaces:
com.atlassian.plugin.web.api.baseconditions.BaseCondition
,com.atlassian.plugin.web.Condition
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class IsUpgradeInProgressCondition
extends AbstractWebCondition
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
This condition returns
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 Summary
ConstructorsConstructorDescriptionIsUpgradeInProgressCondition
(ClusterUpgradeStateManager clusterStateManager, com.atlassian.event.api.EventPublisher eventPublisher, ClusterMessagingService clusterMessagingService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
destroy()
void
void
void
void
boolean
shouldDisplay
(ApplicationUser applicationUser, JiraHelper jiraHelper) Methods inherited from class com.atlassian.jira.plugin.webfragment.conditions.AbstractWebCondition
getApplicationUser, shouldDisplay
-
Constructor Details
-
IsUpgradeInProgressCondition
@Inject public IsUpgradeInProgressCondition(ClusterUpgradeStateManager clusterStateManager, com.atlassian.event.api.EventPublisher eventPublisher, ClusterMessagingService clusterMessagingService)
-
-
Method Details
-
init
- Specified by:
init
in interfacecom.atlassian.plugin.web.Condition
- Overrides:
init
in classAbstractWebCondition
- Throws:
com.atlassian.plugin.PluginParseException
-
shouldDisplay
- Specified by:
shouldDisplay
in classAbstractWebCondition
-
onUpgradeStarted
-
onUpgradeFinished
-
onUpgradeCancelled
-
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-