Class Jira6xServiceDeskPluginEncodedLicenseSupplier
- All Implemented Interfaces:
com.atlassian.cache.Supplier<io.atlassian.fugue.Option<String>>
,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 {@link 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
(MoveJira6xABPServiceDeskPermissions
). To work around this problem
we move the license moveToUpgradeStore()
into a new location that means it becomes inactive but is still
available to upgrade tasks through getUpgrade()
or getCurrentOrUpgrade()
.
- Since:
- 7.0
-
Constructor Summary
ConstructorDescriptionJira6xServiceDeskPluginEncodedLicenseSupplier
(ApplicationProperties applicationProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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>
Retrieves encoded Service Desk license string from plugin store or the upgrade location if it exists.io.atlassian.fugue.Option<String>
Retrieves encoded Service Desk license from the upgrade location.void
Move the license from the UPM store into a location for upgrade.
-
Constructor Details
-
Jira6xServiceDeskPluginEncodedLicenseSupplier
-
-
Method Details
-
get
Retrieves encoded Service Desk license string from plugin store. No validation is performed, so returned license may be malformed or may not be a Service Desk license. -
getUpgrade
Retrieves encoded Service Desk license from the upgrade location. No validation is performed, so returned license may be malformed or may not be a Service Desk license.- Returns:
- Option containing encoded license or
Option.none()
if there was no such license.
-
getCurrentOrUpgrade
Retrieves encoded Service Desk license string from plugin store or the upgrade location if it exists. No validation is performed, so returned license may be malformed or may not be a Service Desk license.- Returns:
- the encoded Service Desk license string from plugin store or the upgrade location if it exists.
-
moveToUpgradeStore
public void moveToUpgradeStore()Move the license from the UPM store into a location for upgrade. This logically removes the license from JIRA but leaves it accessible to upgrade tasks throughgetUpgrade()
orgetCurrentOrUpgrade()
. -
clear
public void clear()Remove the SD license from the plugin store and/or upgrade location.
-