com.atlassian.confluence.spaces
Class DefaultSpaceLicenseManager

java.lang.Object
  extended by com.atlassian.confluence.spaces.DefaultSpaceLicenseManager
All Implemented Interfaces:
SpaceLicenseManager

public class DefaultSpaceLicenseManager
extends java.lang.Object
implements SpaceLicenseManager


Field Summary
 
Fields inherited from interface com.atlassian.confluence.spaces.SpaceLicenseManager
OLD_SPACE_LICENSE_KEY, SPACE_LICENSE_KEY
 
Constructor Summary
DefaultSpaceLicenseManager()
           
 
Method Summary
 com.atlassian.license.License getLicenseForSpace(java.lang.String spaceKey)
          Get the license key attached to the space and create a new license object
 java.lang.String getLicenseKeyForSpace(java.lang.String spaceKey)
          We changed the key to store the space license.
 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 setBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)
           
 void setLicenseOnSpace(java.lang.String spaceKey, java.lang.String licenseKey)
          Store a Confluence license against a space
 void setMessageManager(MessageManager messageManager)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSpaceLicenseManager

public DefaultSpaceLicenseManager()
Method Detail

getUserLimit

public int getUserLimit(java.lang.String spaceKey)
Description copied from interface: SpaceLicenseManager
Get the userlimit within a space based on the license attached.

Specified by:
getUserLimit in interface SpaceLicenseManager
Parameters:
spaceKey - key of the space
Returns:
int user limit. If there is no user limit -1 will be retured.

getLicenseForSpace

public com.atlassian.license.License getLicenseForSpace(java.lang.String spaceKey)
Get the license key attached to the space and create a new license object

Specified by:
getLicenseForSpace in interface SpaceLicenseManager
Parameters:
spaceKey -
Returns:

getLicenseKeyForSpace

public java.lang.String getLicenseKeyForSpace(java.lang.String spaceKey)
We changed the key to store the space license. For backwards compatibility we check for the old key as well. We can remove this check in about a month since all licenses will use the new key by then.

Specified by:
getLicenseKeyForSpace in interface SpaceLicenseManager
Parameters:
spaceKey - The space key
Returns:
licenseKey The space's license as a String

setLicenseOnSpace

public void setLicenseOnSpace(java.lang.String spaceKey,
                              java.lang.String licenseKey)
                       throws com.atlassian.license.LicenseException
Description copied from interface: SpaceLicenseManager
Store a Confluence license against a space

Specified by:
setLicenseOnSpace in interface SpaceLicenseManager
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

public void removeLicenseFromSpace(java.lang.String spaceKey)
Description copied from interface: SpaceLicenseManager
removes an evaluation license from the space converting it into a standard space

Specified by:
removeLicenseFromSpace in interface SpaceLicenseManager
Parameters:
spaceKey - The space key

setBandanaManager

public void setBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)

setMessageManager

public void setMessageManager(MessageManager messageManager)

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.