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

java.lang.Object
  extended bycom.atlassian.jira.web.action.util.JiraLicenseUtils

public class JiraLicenseUtils
extends Object


Field Summary
static String JIRA_ENTERPRISE_LEVEL
           
static String JIRA_LICENSE_KEY
           
static String JIRA_LICENSE_REG_LOCATION
           
static String JIRA_PROFESSIONAL_LEVEL
           
static String JIRA_STANDARD_LEVEL
           
 
Constructor Summary
JiraLicenseUtils()
           
 
Method Summary
static String checkPartnerDetails(com.atlassian.license.License license)
           
static com.atlassian.license.LicenseRegistry getLicenseRegistry()
           
static boolean isLicenseSetup()
           
static boolean isPartnerDetailsValid(javax.servlet.ServletContext servletContext)
           
static boolean needLicenseExtensionConfirm(javax.servlet.ServletContext servletContext)
           
static com.atlassian.license.License setLicense(String license)
          This does all the validation before setting the license in the app properties.
static String validateLicenseAgainstBuild(String license)
          Validates that the license key is a valid license and that it matches the currently running JIRA build.
static String validateLicenseRegion(String license)
           
 
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 String JIRA_ENTERPRISE_LEVEL
See Also:
Constant Field Values

JIRA_PROFESSIONAL_LEVEL

public static final String JIRA_PROFESSIONAL_LEVEL
See Also:
Constant Field Values

JIRA_STANDARD_LEVEL

public static final String JIRA_STANDARD_LEVEL
See Also:
Constant Field Values

JIRA_LICENSE_KEY

public static final String JIRA_LICENSE_KEY
See Also:
Constant Field Values

JIRA_LICENSE_REG_LOCATION

public static final 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(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 LicenseManager.setLicense(String, 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 String validateLicenseAgainstBuild(String license)
                                          throws com.atlassian.license.LicenseException
Validates that the license key is a valid 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

validateLicenseRegion

public static String validateLicenseRegion(String license)
                                    throws com.atlassian.license.LicenseException
Throws:
com.atlassian.license.LicenseException

getLicenseRegistry

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

isLicenseSetup

public static boolean isLicenseSetup()

isPartnerDetailsValid

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

checkPartnerDetails

public static String checkPartnerDetails(com.atlassian.license.License license)


Copyright © 2002-2006 Atlassian. All Rights Reserved.