com.atlassian.jira.web.action.util
Class JiraLicenseUtils

java.lang.Object
  extended by com.atlassian.jira.web.action.util.JiraLicenseUtils

public class JiraLicenseUtils
extends java.lang.Object


Field Summary
static java.lang.String JIRA_ENTERPRISE_LEVEL
           
static java.lang.String JIRA_LICENSE_KEY
           
static java.lang.String JIRA_LICENSE_REG_LOCATION
           
static java.lang.String JIRA_PROFESIONAL_LEVEL
           
static java.lang.String JIRA_STANDARD_LEVEL
           
 
Constructor Summary
JiraLicenseUtils()
           
 
Method Summary
static com.atlassian.license.LicenseRegistry getLicenseRegistry()
           
static boolean isLicenseSetup()
           
static boolean needLicenseExtensionConfirm(javax.servlet.ServletContext servletContext)
           
static com.atlassian.license.License setLicense(java.lang.String license)
          This does all the validation before setting the license in the app properties.
static java.lang.String validateLicenseAgainstBuild(java.lang.String license)
          Validates that the license key is a vliad license and that it matches the currently running JIRA build.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JIRA_ENTERPRISE_LEVEL

public static final java.lang.String JIRA_ENTERPRISE_LEVEL
See Also:
Constant Field Values

JIRA_PROFESIONAL_LEVEL

public static final java.lang.String JIRA_PROFESIONAL_LEVEL
See Also:
Constant Field Values

JIRA_STANDARD_LEVEL

public static final java.lang.String JIRA_STANDARD_LEVEL
See Also:
Constant Field Values

JIRA_LICENSE_KEY

public static final java.lang.String JIRA_LICENSE_KEY
See Also:
Constant Field Values

JIRA_LICENSE_REG_LOCATION

public static final java.lang.String JIRA_LICENSE_REG_LOCATION
See Also:
Constant Field Values
Constructor Detail

JiraLicenseUtils

public JiraLicenseUtils()
Method Detail

setLicense

public static com.atlassian.license.License setLicense(java.lang.String license)
This does all the validation before setting the license in the app properties.

This method should be called from within JIRA instead of com.atlassian.license.LicenseManager#setLicense(java.lang.String) as this method clears any application-level confirmation.

Parameters:
license -
Returns:
The license, or null if the string given is invalid

needLicenseExtensionConfirm

public static boolean needLicenseExtensionConfirm(javax.servlet.ServletContext servletContext)

validateLicenseAgainstBuild

public static java.lang.String validateLicenseAgainstBuild(java.lang.String license)
                                                    throws com.atlassian.license.LicenseException
Validates that the license key is a vliad license and that it matches the currently running JIRA build.

Parameters:
license - the license key to validate
Returns:
a i18n key for a found error, null if no error found
Throws:
com.atlassian.license.LicenseException

getLicenseRegistry

public static com.atlassian.license.LicenseRegistry getLicenseRegistry()

isLicenseSetup

public static boolean isLicenseSetup()


Copyright © 2002-2006 Atlassian. All Rights Reserved.