com.atlassian.jira.license
Class JiraLicenseManagerImpl

java.lang.Object
  extended by com.atlassian.jira.license.JiraLicenseManagerImpl
All Implemented Interfaces:
JiraLicenseManager

public class JiraLicenseManagerImpl
extends Object
implements JiraLicenseManager

Since:
v4.0

Constructor Summary
JiraLicenseManagerImpl(JiraLicenseStore licenseStore, BuildUtilsInfo buildUtilsInfo, com.atlassian.extras.api.LicenseManager licenseManager, ApplicationProperties applicationProperties, ExternalLinkUtil externalLinkUtil, com.atlassian.license.SIDManager sidManager, DateTimeFormatter dateTimeFormatter, I18nHelper.BeanFactory i18nFactory, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
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()
          Gets the current license details of this instance.
 LicenseDetails getLicense(String licenseString)
          This will decode the given string into a LicenseDetails object.
 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
 LicenseDetails setLicense(String licenseString)
          Sets the current license of this instance.
 LicenseDetails setLicenseNoEvent(String licenseString)
          Sets the current license of this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraLicenseManagerImpl

public JiraLicenseManagerImpl(JiraLicenseStore licenseStore,
                              BuildUtilsInfo buildUtilsInfo,
                              com.atlassian.extras.api.LicenseManager licenseManager,
                              ApplicationProperties applicationProperties,
                              ExternalLinkUtil externalLinkUtil,
                              com.atlassian.license.SIDManager sidManager,
                              DateTimeFormatter dateTimeFormatter,
                              I18nHelper.BeanFactory i18nFactory,
                              com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

getServerId

public String getServerId()
Description copied from interface: JiraLicenseManager
Gets the server ID of the JIRA instance, creates it if it doesn't already exists.

Specified by:
getServerId in interface JiraLicenseManager
Returns:
the server ID for this JIRA instance.

getLicense

public LicenseDetails getLicense()
Description copied from interface: JiraLicenseManager
Gets the current license details of this instance.

Specified by:
getLicense in interface JiraLicenseManager
Returns:
the JIRA license of this instance, or NULL_LICENSE_DETAILS if it doesn't exist.

getLicense

public LicenseDetails getLicense(String licenseString)
Description copied from interface: JiraLicenseManager
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.

Specified by:
getLicense in interface JiraLicenseManager
Parameters:
licenseString - the license string
Returns:
the JIRA license for the given string or NULL_LICENSE_DETAILS if it is blank

isDecodeable

public boolean isDecodeable(String licenseString)
Description copied from interface: JiraLicenseManager
This returns true if the provided licence string can be decoded into a valid licence

Specified by:
isDecodeable in interface JiraLicenseManager
Parameters:
licenseString - the license string
Returns:
true if it is can be decoded and false otherwise

setLicense

public LicenseDetails setLicense(String licenseString)
Description copied from interface: JiraLicenseManager
Sets the current license of this instance.

Note that this method will fire a NewLicenseEvent.

Specified by:
setLicense in interface JiraLicenseManager
Parameters:
licenseString - the license string
Returns:
the JIRA license of this instance, this shouldn't be null if the license is valid.

setLicenseNoEvent

public LicenseDetails setLicenseNoEvent(String licenseString)
Description copied from interface: JiraLicenseManager
Sets the current license of this instance.

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

Specified by:
setLicenseNoEvent in interface JiraLicenseManager
Parameters:
licenseString - the license string
Returns:
the JIRA license of this instance, this shouldn't be null if the license is valid.

confirmProceedUnderEvaluationTerms

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

Specified by:
confirmProceedUnderEvaluationTerms in interface JiraLicenseManager
Parameters:
userName - the name of the user that made the confirmation


Copyright © 2002-2012 Atlassian. All Rights Reserved.