public class JiraLicenseManagerImpl extends Object implements JiraLicenseManager
Constructor and Description |
---|
JiraLicenseManagerImpl(BuildUtilsInfo buildUtilsInfo,
com.atlassian.license.SIDManager sidManager,
com.atlassian.event.api.EventPublisher eventPublisher,
MultiLicenseStore multiLicenseStore,
FeatureManager featureManager,
LicenseDetailsFactory licenseDetailsFactory) |
Modifier and Type | Method and Description |
---|---|
void |
clearAndSetLicense(String licenseString)
Removes all licenses from JIRA and replace them with the new license.
|
LicenseDetails |
clearAndSetLicenseNoEvent(String licenseString)
Removes all licenses from JIRA and replace them with the new license without raising an event.
|
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()
Gets the current license details of this instance.
|
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.
|
public JiraLicenseManagerImpl(BuildUtilsInfo buildUtilsInfo, com.atlassian.license.SIDManager sidManager, com.atlassian.event.api.EventPublisher eventPublisher, MultiLicenseStore multiLicenseStore, FeatureManager featureManager, LicenseDetailsFactory licenseDetailsFactory)
public String getServerId()
JiraLicenseManager
getServerId
in interface JiraLicenseManager
public LicenseDetails getLicense()
JiraLicenseManager
getLicense
in interface JiraLicenseManager
public LicenseDetails getLicense(String licenseString)
JiraLicenseManager
LicenseDetails
object. It is assumed that the string is valid.
You will wear the consequences if it is not.getLicense
in interface JiraLicenseManager
licenseString
- the license string@Nonnull public Iterable<LicenseDetails> getLicenses()
JiraLicenseManager
getLicenses
in interface JiraLicenseManager
public boolean isLicensed(@Nonnull LicenseRoleId role)
JiraLicenseManager
isLicensed
in interface JiraLicenseManager
role
- the rolepublic boolean isDecodeable(String licenseString)
JiraLicenseManager
isDecodeable
in interface JiraLicenseManager
licenseString
- the license stringpublic LicenseDetails setLicense(String licenseString)
JiraLicenseManager
Note that this method will fire a NewLicenseEvent
.
setLicense
in interface JiraLicenseManager
licenseString
- the license stringlicense
is valid.public LicenseDetails setLicenseNoEvent(String licenseString)
JiraLicenseManager
This is a special version of JiraLicenseManager.setLicense(String)
that will not fire any event and is purely for use
during a Data Import.
setLicenseNoEvent
in interface JiraLicenseManager
licenseString
- the license stringlicense
is valid.public void clearAndSetLicense(String licenseString)
JiraLicenseManager
clearAndSetLicense
in interface JiraLicenseManager
public LicenseDetails clearAndSetLicenseNoEvent(String licenseString)
JiraLicenseManager
clearAndSetLicenseNoEvent
in interface JiraLicenseManager
public void confirmProceedUnderEvaluationTerms(String userName)
JiraLicenseManager
confirmProceedUnderEvaluationTerms
in interface JiraLicenseManager
userName
- the name of the user that made the confirmationCopyright © 2002-2015 Atlassian. All Rights Reserved.