Package com.atlassian.bamboo.license
Class BambooLicenseManagerImpl
java.lang.Object
com.atlassian.bamboo.license.BambooLicenseManagerImpl
- All Implemented Interfaces:
BambooLicenseManager
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
authenticateLicense
(String license) Checks whether or not a specific license is validint
Checks the maximum number of local agents allowed for the current license.int
Checks the maximum number of plans that can be created for the current license.int
getAllowedNumberOfPlans
(String licenseString) Checks the maximum number of plans that can be created for the provided licenseint
Checks the maximum number of remote agents allowed for the current license.protected Date
@Nullable com.atlassian.extras.api.bamboo.BambooLicense
Retrieves the current bamboo license for this instance.@Nullable String
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Checks whether the existing license is validboolean
Checks if the maintenance has expired for the given license based on the current build number.boolean
boolean
License type checksvoid
setLicense
(String license) Sets the license for this Bamboo instance.
-
Field Details
-
BAMBOO_LICENSE_KEY
- See Also:
-
-
Constructor Details
-
BambooLicenseManagerImpl
-
-
Method Details
-
getLicense
@Nullable public @Nullable 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 interfaceBambooLicenseManager
- Returns:
- BambooLicense if exists or null if no license exists.
-
getLicenseString
-
setLicense
Description copied from interface:BambooLicenseManager
Sets the license for this Bamboo instance.- Specified by:
setLicense
in interfaceBambooLicenseManager
- Parameters:
license
- string
-
authenticateLicense
Description copied from interface:BambooLicenseManager
Checks whether or not a specific license is valid- Specified by:
authenticateLicense
in interfaceBambooLicenseManager
- 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 interfaceBambooLicenseManager
- Returns:
- true if license is valid, otherwise false
-
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 interfaceBambooLicenseManager
- 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 interfaceBambooLicenseManager
- 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 interfaceBambooLicenseManager
- 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 interfaceBambooLicenseManager
- Returns:
- The maximum number of plans that can be created or -1 if not limited
-
getAllowedNumberOfPlans
Description copied from interface:BambooLicenseManager
Checks the maximum number of plans that can be created for the provided license- Specified by:
getAllowedNumberOfPlans
in interfaceBambooLicenseManager
- Parameters:
licenseString
- to check- Returns:
- The maximum number of plans that can be created or -1 if not limited
-
isStarter
public boolean isStarter()Description copied from interface:BambooLicenseManager
License type checksNote: If you add any new license checks here, make sure to update the
UpdateLicenseAction.getLicenseTypesList(com.atlassian.bamboo.license.BambooLicenseManager)
to handle the new license type.- Specified by:
isStarter
in interfaceBambooLicenseManager
-
isBasicEdition
public boolean isBasicEdition() -
isEvaluation
public boolean isEvaluation()- Specified by:
isEvaluation
in interfaceBambooLicenseManager
-
isAcademic
public boolean isAcademic()- Specified by:
isAcademic
in interfaceBambooLicenseManager
-
isDemonstration
public boolean isDemonstration()- Specified by:
isDemonstration
in interfaceBambooLicenseManager
-
isDeveloper
public boolean isDeveloper()- Specified by:
isDeveloper
in interfaceBambooLicenseManager
-
isCommunity
public boolean isCommunity()- Specified by:
isCommunity
in interfaceBambooLicenseManager
-
isOpenSource
public boolean isOpenSource()- Specified by:
isOpenSource
in interfaceBambooLicenseManager
-
isCommercial
public boolean isCommercial()- Specified by:
isCommercial
in interfaceBambooLicenseManager
-
isDataCenter
public boolean isDataCenter()- Specified by:
isDataCenter
in interfaceBambooLicenseManager
-