com.atlassian.jira.license
Interface JiraLicenseManager

All Known Implementing Classes:
JiraLicenseManagerImpl

public interface JiraLicenseManager

This manager is used to perform Licence related tasks using the spanking brand new Licencing 2.0

Since:
v4.0

Method Summary
 void confirmProceedUnderEvaluationTerms(String userName)
          This will confirm that user has agreed to proceed under Evaluation terms, typically when the license is too old for the current JIRA build.
 LicenseDetails getLicense()
          Deprecated. this method will disappear in v7.0, please use getLicenses(); since v6.3
 LicenseDetails getLicense(String licenseString)
          This will decode the given string into a LicenseDetails object.
 Iterable<LicenseDetails> getLicenses()
          Retrieve a list of all products licenses installed in this instance.
 String getServerId()
          Gets the server ID of the JIRA instance, creates it if it doesn't already exists.
 boolean isDecodeable(String licenseString)
          This returns true if the provided licence string can be decoded into a valid licence
 boolean isLicensed(LicenseRoleId role)
          Returns true if the given license role is present and licensed.
 LicenseDetails setLicense(String licenseString)
          Sets the current license of this instance.
 LicenseDetails setLicenseNoEvent(String licenseString)
          Sets the current license of this instance.
 

Method Detail

getServerId

String getServerId()
Gets the server ID of the JIRA instance, creates it if it doesn't already exists.

Returns:
the server ID for this JIRA instance.

getLicense

@Deprecated
LicenseDetails getLicense()
Deprecated. this method will disappear in v7.0, please use getLicenses(); since v6.3

Gets the current license details of this instance.

Returns:
the JIRA license of this instance, or NULL_LICENSE_DETAILS if it doesn't exist.
Throws:
com.atlassian.extras.common.LicenseException - if the stored license string cannot be decoded

getLicense

LicenseDetails getLicense(String licenseString)
This will decode the given string into a LicenseDetails object. It is assumed that the string is valid. You will wear the consequences if it is not.

Parameters:
licenseString - the license string
Returns:
the JIRA license for the given string or NULL_LICENSE_DETAILS if it is blank
Throws:
com.atlassian.extras.common.LicenseException - if the stored license string cannot be decoded

isLicensed

@ExperimentalApi
boolean isLicensed(@Nonnull
                                   LicenseRoleId role)
Returns true if the given license role is present and licensed.

Parameters:
role - the role
Returns:
true if the given license role is present and licensed.
Since:
6.3

isDecodeable

boolean isDecodeable(String licenseString)
This returns true if the provided licence string can be decoded into a valid licence

Parameters:
licenseString - the license string
Returns:
true if it is can be decoded and false otherwise

setLicense

LicenseDetails setLicense(String licenseString)
Sets the current license of this instance.

Note that this method will fire a NewLicenseEvent.

Parameters:
licenseString - the license string
Returns:
the JIRA license of this instance, this shouldn't be null if the license is valid.

setLicenseNoEvent

LicenseDetails setLicenseNoEvent(String licenseString)
Sets the current license of this instance.

This is a special version of setLicense(String) that will not fire any event and is purely for use during a Data Import.

Parameters:
licenseString - the license string
Returns:
the JIRA license of this instance, this shouldn't be null if the license is valid.

confirmProceedUnderEvaluationTerms

void confirmProceedUnderEvaluationTerms(String userName)
This will confirm that user has agreed to proceed under Evaluation terms, typically when the license is too old for the current JIRA build.

Parameters:
userName - the name of the user that made the confirmation

getLicenses

@ExperimentalApi
Iterable<LicenseDetails> getLicenses()
Retrieve a list of all products licenses installed in this instance.

In JIRA 6.3 this method returns an iterable containing at most one license. In later versions it may contain more.

Returns:
all product licenses installed in this instance.
Since:
6.3


Copyright © 2002-2014 Atlassian. All Rights Reserved.