com.atlassian.jira.bc.license
Class JiraLicenseServiceImpl

java.lang.Object
  extended by com.atlassian.jira.bc.license.JiraLicenseServiceImpl
All Implemented Interfaces:
JiraLicenseService, JiraLicenseUpdaterService

public class JiraLicenseServiceImpl
extends Object
implements JiraLicenseUpdaterService

The implementation of JiraLicenseService

Since:
v4.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.bc.license.JiraLicenseService
JiraLicenseService.ValidationResult
 
Constructor Summary
JiraLicenseServiceImpl(JiraLicenseManager licenseManager, BuildUtilsInfo buildUtilsInfo, UserUtil userUtil)
           
 
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()
          Returns a non null LicenseDetails object that represents the current license or an instance of com.atlassian.jira.license.NullLicenseDetails if the license is not currently setup
 String getServerId()
          Gets the server ID of the JIRA instance, creates it if it doesn't already exists.
 LicenseDetails setLicense(JiraLicenseService.ValidationResult validationResult)
          Sets the license from the given ValidationResult as the current JIRA license.
 JiraLicenseService.ValidationResult validate(I18nHelper i18nHelper, String licenseString)
          Validates the license String in preparation for setting the license.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraLicenseServiceImpl

public JiraLicenseServiceImpl(JiraLicenseManager licenseManager,
                              BuildUtilsInfo buildUtilsInfo,
                              UserUtil userUtil)
Method Detail

getServerId

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

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

getLicense

public LicenseDetails getLicense()
Description copied from interface: JiraLicenseService
Returns a non null LicenseDetails object that represents the current license or an instance of com.atlassian.jira.license.NullLicenseDetails if the license is not currently setup

Specified by:
getLicense in interface JiraLicenseService
Returns:
a non null LicenseDetails object

validate

public JiraLicenseService.ValidationResult validate(I18nHelper i18nHelper,
                                                    String licenseString)
Description copied from interface: JiraLicenseService
Validates the license String in preparation for setting the license. Populates the ValidationResult with errors while validating.

Specified by:
validate in interface JiraLicenseService
Parameters:
i18nHelper - the helper for i18n
licenseString - the license to validate
Returns:
a validation result with the validated license and potential errors.

setLicense

public LicenseDetails setLicense(JiraLicenseService.ValidationResult validationResult)
Description copied from interface: JiraLicenseUpdaterService
Sets the license from the given ValidationResult as the current JIRA license. The validation result must have no errors.

Specified by:
setLicense in interface JiraLicenseUpdaterService
Parameters:
validationResult - the validation result to get the license from.
Returns:
the new LicenseDetails created from the validated license.

confirmProceedUnderEvaluationTerms

public void confirmProceedUnderEvaluationTerms(String userName)
Description copied from interface: JiraLicenseService
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 JiraLicenseService
Parameters:
userName - the name of the user that amde the confirmation


Copyright © 2002-2011 Atlassian. All Rights Reserved.