com.atlassian.confluence.spaces
Interface SpaceLicenseManager

All Known Implementing Classes:
DefaultSpaceLicenseManager

public interface SpaceLicenseManager

The SpaceLicenseManager handles requests to licenses attached to a space.

Licenses on a space keep track of the number of users allowed within the space and other license details


Field Summary
static java.lang.String OLD_SPACE_LICENSE_KEY
           
static java.lang.String SPACE_LICENSE_KEY
           
 
Method Summary
 com.atlassian.license.License getLicenseForSpace(java.lang.String spaceKey)
          Retrieve a Confluence license attached to a space.
 java.lang.String getLicenseKeyForSpace(java.lang.String spaceKey)
          Retrieve the license key of a license attached to a space
 int getUserLimit(java.lang.String spaceKey)
          Get the userlimit within a space based on the license attached.
 void removeLicenseFromSpace(java.lang.String spaceKey)
          removes an evaluation license from the space converting it into a standard space
 void setLicenseOnSpace(java.lang.String spaceKey, java.lang.String licenseKey)
          Store a Confluence license against a space
 

Field Detail

SPACE_LICENSE_KEY

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

OLD_SPACE_LICENSE_KEY

static final java.lang.String OLD_SPACE_LICENSE_KEY
See Also:
Constant Field Values
Method Detail

getUserLimit

int getUserLimit(java.lang.String spaceKey)
Get the userlimit within a space based on the license attached.

Parameters:
spaceKey - key of the space
Returns:
int user limit. If there is no user limit -1 will be retured.

getLicenseForSpace

com.atlassian.license.License getLicenseForSpace(java.lang.String spaceKey)
Retrieve a Confluence license attached to a space. If no license is attached to the space, the method will return an empty String.

Parameters:
spaceKey - The space key
Returns:
license The Confluence license

getLicenseKeyForSpace

java.lang.String getLicenseKeyForSpace(java.lang.String spaceKey)
Retrieve the license key of a license attached to a space

Parameters:
spaceKey - The space key
Returns:
licenseKey The space's license as a String

setLicenseOnSpace

void setLicenseOnSpace(java.lang.String spaceKey,
                       java.lang.String licenseKey)
                       throws com.atlassian.license.LicenseException
Store a Confluence license against a space

Parameters:
spaceKey - The space key
licenseKey - The Confluence license
Throws:
com.atlassian.license.LicenseException - throws a license exception if the license is not valid

removeLicenseFromSpace

void removeLicenseFromSpace(java.lang.String spaceKey)
removes an evaluation license from the space converting it into a standard space

Parameters:
spaceKey - The space key


Copyright © 2003-2010 Atlassian. All Rights Reserved.