public class

LicenseDetailsFactoryImpl

extends Object
implements LicenseDetailsFactory
java.lang.Object
   ↳ com.atlassian.jira.license.LicenseDetailsFactoryImpl

Summary

Nested Classes
class LicenseDetailsFactoryImpl.JiraProductLicenseManager JIRA internal license manager used for decoding license keys. 
Public Constructors
LicenseDetailsFactoryImpl(ApplicationProperties applicationProperties, ExternalLinkUtil externalLinkUtil, BuildUtilsInfo buildUtilsInfo, I18nHelper.BeanFactory i18Factory, DateTimeFormatter dateTimeFormatter, Clock clock)
Public Methods
@Nonnull LicenseDetails getLicense(String licenseString)
Converts an encoded license key into a LicenseDetails.
boolean isDecodeable(String licenseString)
Determines whether a license string can be decoded by this factory.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.license.LicenseDetailsFactory

Public Constructors

public LicenseDetailsFactoryImpl (ApplicationProperties applicationProperties, ExternalLinkUtil externalLinkUtil, BuildUtilsInfo buildUtilsInfo, I18nHelper.BeanFactory i18Factory, DateTimeFormatter dateTimeFormatter, Clock clock)

Public Methods

@Nonnull public LicenseDetails getLicense (String licenseString)

Converts an encoded license key into a LicenseDetails. This method never returns null, if the provided license key is undecodable or not for a JIRA Product a com.atlassian.extras.api.LicenseException is thrown.

Parameters
licenseString the encoded license key.
Returns
  • the corresponding license details.
Throws
LicenseException

public boolean isDecodeable (String licenseString)

Determines whether a license string can be decoded by this factory. If this returns true, then getLicense is guaranteed to return a valid non-placeholder LicenseDetails object.

Parameters
licenseString the (usually encrypted) license string to test
Returns
  • true if the license string can be interpreted by this factory, false otherwise