public class Jira6xServiceDeskPluginEncodedLicenseSupplier extends Object implements com.atlassian.cache.Supplier<io.atlassian.fugue.Option<String>>
This class is intended to be used solely for the purposes of checking & migrating pre-7.0 Service Desk licenses. It is not a general-purposes SD license supplier, instead, see JiraLicenseManager#getLicense(com.atlassian.application.api.ApplicationKey).
To start and upgrade JIRA it needs to have all its licenses in maintenance. JIRA forces the admin to add/remove licenses until this is the case. This means that we can remove the old UPM SD license before migration has run which is very bad because we need it to migrate ({@link com.atlassian.jira.upgrade.tasks.role.MoveJira6xABPServiceDeskPermissions}). To work around this problem we move the license {@link #moveToUpgradeStore()} into a new location that means it becomes inactive but is still available to upgrade tasks through {@link #getUpgrade()} or {@link #getCurrentOrUpgrade()}.
Constructor and Description |
---|
Jira6xServiceDeskPluginEncodedLicenseSupplier(ApplicationProperties applicationProperties) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove the SD license from the plugin store and/or upgrade location.
|
io.atlassian.fugue.Option<String> |
get()
Retrieves encoded Service Desk license string from plugin store.
|
io.atlassian.fugue.Option<String> |
getCurrentOrUpgrade()
Retrieves encoded Service Desk license string from plugin store or the upgrade location if it exists.
|
io.atlassian.fugue.Option<String> |
getUpgrade()
Retrieves encoded Service Desk license from the upgrade location.
|
void |
moveToUpgradeStore()
Move the license from the UPM store into a location for upgrade.
|
public Jira6xServiceDeskPluginEncodedLicenseSupplier(ApplicationProperties applicationProperties)
public io.atlassian.fugue.Option<String> get()
get
in interface java.util.function.Supplier<io.atlassian.fugue.Option<String>>
Option.none()
if there was no license in the plugin
location.public io.atlassian.fugue.Option<String> getUpgrade()
Option.none()
if there was no such license.public io.atlassian.fugue.Option<String> getCurrentOrUpgrade()
public void moveToUpgradeStore()
getUpgrade()
or getCurrentOrUpgrade()
.public void clear()
Copyright © 2002-2024 Atlassian. All Rights Reserved.