public class

Jira6xServiceDeskPluginEncodedLicenseSupplier

extends Object
implements Supplier<T>
java.lang.Object
   ↳ com.atlassian.jira.license.Jira6xServiceDeskPluginEncodedLicenseSupplier

Class Overview

Supplies a encoded plugin license for Service Desk version 1 or 2.

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

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 moveToUpgradeStore() into a new location that means it becomes inactive but is still available to upgrade tasks through getUpgrade() or getCurrentOrUpgrade().

Summary

Public Constructors
Jira6xServiceDeskPluginEncodedLicenseSupplier(ApplicationProperties applicationProperties)
Public Methods
void clear()
Remove the SD license from the plugin store and/or upgrade location.
Option<String> get()
Retrieves encoded Service Desk license string from plugin store.
Option<String> getCurrentOrUpgrade()
Retrieves encoded Service Desk license string from plugin store or the upgrade location if it exists.
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.cache.Supplier

Public Constructors

public Jira6xServiceDeskPluginEncodedLicenseSupplier (ApplicationProperties applicationProperties)

Public Methods

public void clear ()

Remove the SD license from the plugin store and/or upgrade location.

public Option<String> 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.

Returns
  • Option containing encoded license or none() if there was no license in the plugin location.

public Option<String> 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.

public Option<String> 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 none() if there was no such license.

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 through getUpgrade() or getCurrentOrUpgrade().