com.atlassian.bamboo.license
Class BambooLicenseManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.license.BambooLicenseManagerImpl
All Implemented Interfaces:
BambooLicenseManager

public class BambooLicenseManagerImpl
extends java.lang.Object
implements BambooLicenseManager


Field Summary
static java.lang.String BAMBOO_LICENSE_KEY
           
 
Fields inherited from interface com.atlassian.bamboo.license.BambooLicenseManager
MAX_LOCAL_AGENTS_BASIC, MAX_LOCAL_AGENTS_UNLIMITED, MAX_PLANS_STARTER, MAX_PLANS_UNLIMITED, MAX_REMOTE_AGENTS_5, MAX_REMOTE_AGENTS_ENTERPRISE, MAX_REMOTE_AGENTS_NONE, MAX_REMOTE_AGENTS_PROFESSIONAL, MAX_REMOTE_AGENTS_STANDARD, MAX_REMOTE_AGENTS_UNLIMITED
 
Constructor Summary
BambooLicenseManagerImpl(BootstrapManager bootstrapManager)
           
 
Method Summary
 boolean authenticateLicense(java.lang.String license)
          Checks whether or not a specific license is valid
 int getAllowedNumberOfLocalAgents()
          Checks the maximum number of local agents allowed for the current license.
 int getAllowedNumberOfPlans()
          Checks the maximum number of plans that can be created for the current license.
 int getAllowedNumberOfPlans(java.lang.String licenseString)
          Checks the maximum number of plans that can be created for the provided license
 int getAllowedNumberOfRemoteAgents()
          Checks the maximum number of remote agents allowed for the current license.
protected  java.util.Date getBuildDate()
           
 com.atlassian.extras.api.bamboo.BambooLicense getLicense()
          Retrieves the current bamboo license for this instance.
 boolean isAcademic()
           
 boolean isBasicEdition()
           
 boolean isCommercial()
           
 boolean isCommunity()
           
 boolean isDemonstration()
           
 boolean isDeveloper()
           
 boolean isEvaluation()
           
 boolean isLicenseValid()
          Checks whether the existing license is valid
 boolean isMaintenanceExpiredForBuild()
          Checks if the maintenance has expired for the given license based on the current build number.
 boolean isOpenSource()
           
 boolean isStarter()
           
 void setLicense(java.lang.String license)
          Sets the license for this Bamboo instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BAMBOO_LICENSE_KEY

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

BambooLicenseManagerImpl

public BambooLicenseManagerImpl(@NotNull
                                BootstrapManager bootstrapManager)
Method Detail

getLicense

@Nullable
public com.atlassian.extras.api.bamboo.BambooLicense getLicense()
Description copied from interface: BambooLicenseManager
Retrieves the current bamboo license for this instance. Looks for version 2 license only

Specified by:
getLicense in interface BambooLicenseManager
Returns:
BambooLicense if exists or null if no license exists.

setLicense

public void setLicense(java.lang.String license)
Description copied from interface: BambooLicenseManager
Sets the license for this Bamboo instance.

Specified by:
setLicense in interface BambooLicenseManager
Parameters:
license - string

authenticateLicense

public boolean authenticateLicense(java.lang.String license)
Description copied from interface: BambooLicenseManager
Checks whether or not a specific license is valid

Specified by:
authenticateLicense in interface BambooLicenseManager
Parameters:
license - to check
Returns:
true if license is valid, otherwise false

isLicenseValid

public boolean isLicenseValid()
Description copied from interface: BambooLicenseManager
Checks whether the existing license is valid

Specified by:
isLicenseValid in interface BambooLicenseManager
Returns:
true if license is valid, otherwise false

getBuildDate

protected java.util.Date getBuildDate()

isMaintenanceExpiredForBuild

public boolean isMaintenanceExpiredForBuild()
Description copied from interface: BambooLicenseManager
Checks if the maintenance has expired for the given license based on the current build number.

Specified by:
isMaintenanceExpiredForBuild in interface BambooLicenseManager
Returns:
true if expired otherwise false.

getAllowedNumberOfRemoteAgents

public int getAllowedNumberOfRemoteAgents()
Description copied from interface: BambooLicenseManager
Checks the maximum number of remote agents allowed for the current license.

Specified by:
getAllowedNumberOfRemoteAgents in interface BambooLicenseManager
Returns:
The maximum number of remote agents allowed or -1 if not limited

getAllowedNumberOfLocalAgents

public int getAllowedNumberOfLocalAgents()
Description copied from interface: BambooLicenseManager
Checks the maximum number of local agents allowed for the current license.

Specified by:
getAllowedNumberOfLocalAgents in interface BambooLicenseManager
Returns:
The maximum number of local agents allowed or -1 if not limited

getAllowedNumberOfPlans

public int getAllowedNumberOfPlans()
Description copied from interface: BambooLicenseManager
Checks the maximum number of plans that can be created for the current license.

Specified by:
getAllowedNumberOfPlans in interface BambooLicenseManager
Returns:
The maximum number of plans that can be created or -1 if not limited

getAllowedNumberOfPlans

public int getAllowedNumberOfPlans(java.lang.String licenseString)
Description copied from interface: BambooLicenseManager
Checks the maximum number of plans that can be created for the provided license

Specified by:
getAllowedNumberOfPlans in interface BambooLicenseManager
Parameters:
licenseString - to check
Returns:
The maximum number of plans that can be created or -1 if not limited

isStarter

public boolean isStarter()
Specified by:
isStarter in interface BambooLicenseManager

isBasicEdition

public boolean isBasicEdition()

isEvaluation

public boolean isEvaluation()
Specified by:
isEvaluation in interface BambooLicenseManager

isAcademic

public boolean isAcademic()
Specified by:
isAcademic in interface BambooLicenseManager

isDemonstration

public boolean isDemonstration()
Specified by:
isDemonstration in interface BambooLicenseManager

isDeveloper

public boolean isDeveloper()
Specified by:
isDeveloper in interface BambooLicenseManager

isCommunity

public boolean isCommunity()
Specified by:
isCommunity in interface BambooLicenseManager

isOpenSource

public boolean isOpenSource()
Specified by:
isOpenSource in interface BambooLicenseManager

isCommercial

public boolean isCommercial()
Specified by:
isCommercial in interface BambooLicenseManager


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.