Package com.atlassian.jira.license
Interface LicenseDetailsFactory
- All Known Implementing Classes:
LicenseDetailsFactoryImpl,MockLicenseDetailsFactory
@Internal
public interface LicenseDetailsFactory
Provides the ability to extract a LicenseDetails object from a license String.
- Since:
- 7.0
-
Method Summary
Modifier and TypeMethodDescriptiongetLicense(String licenseString) Converts an encoded license key into aLicenseDetails.booleanisDecodeable(String licenseString) Determines whether a license string can be decoded by this factory.
-
Method Details
-
getLicense
@Nonnull LicenseDetails getLicense(@Nonnull String licenseString) throws com.atlassian.extras.api.LicenseException Converts an encoded license key into aLicenseDetails. This method never returns null, if the provided license key is undecodable or not for a JIRA Product aLicenseExceptionis thrown.- Parameters:
licenseString- the encoded license key.- Returns:
- the corresponding license details.
- Throws:
com.atlassian.extras.api.LicenseException- if licenseString was null or could not be decoded (seeisDecodeable(String).
-
isDecodeable
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
-