Package com.atlassian.bamboo.license
Class BambooLicenseManagerImpl
java.lang.Object
com.atlassian.bamboo.license.BambooLicenseManagerImpl
- All Implemented Interfaces:
BambooLicenseManager
-
Field Summary
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanauthenticateLicense(String license) Checks whether or not a specific license is validintChecks the maximum number of local agents allowed for the current license.intChecks the maximum number of plans that can be created for the current license.intgetAllowedNumberOfPlans(String licenseString) Checks the maximum number of plans that can be created for the provided licenseintChecks the maximum number of remote agents allowed for the current license.protected Date@Nullable com.atlassian.extras.api.bamboo.BambooLicenseRetrieves the current bamboo license for this instance.@Nullable StringbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanChecks whether the existing license is validbooleanChecks if the maintenance has expired for the given license based on the current build number.booleanbooleanLicense type checksvoidsetLicense(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:BambooLicenseManagerRetrieves the current bamboo license for this instance. Looks for version 2 license only- Specified by:
getLicensein interfaceBambooLicenseManager- Returns:
- BambooLicense if exists or null if no license exists.
-
getLicenseString
-
setLicense
Description copied from interface:BambooLicenseManagerSets the license for this Bamboo instance.- Specified by:
setLicensein interfaceBambooLicenseManager- Parameters:
license- string
-
authenticateLicense
Description copied from interface:BambooLicenseManagerChecks whether or not a specific license is valid- Specified by:
authenticateLicensein interfaceBambooLicenseManager- Parameters:
license- to check- Returns:
- true if license is valid, otherwise false
-
isLicenseValid
public boolean isLicenseValid()Description copied from interface:BambooLicenseManagerChecks whether the existing license is valid- Specified by:
isLicenseValidin interfaceBambooLicenseManager- Returns:
- true if license is valid, otherwise false
-
getBuildDate
-
isMaintenanceExpiredForBuild
public boolean isMaintenanceExpiredForBuild()Description copied from interface:BambooLicenseManagerChecks if the maintenance has expired for the given license based on the current build number.- Specified by:
isMaintenanceExpiredForBuildin interfaceBambooLicenseManager- Returns:
- true if expired otherwise false.
-
getAllowedNumberOfRemoteAgents
public int getAllowedNumberOfRemoteAgents()Description copied from interface:BambooLicenseManagerChecks the maximum number of remote agents allowed for the current license.- Specified by:
getAllowedNumberOfRemoteAgentsin interfaceBambooLicenseManager- Returns:
- The maximum number of remote agents allowed or -1 if not limited
-
getAllowedNumberOfLocalAgents
public int getAllowedNumberOfLocalAgents()Description copied from interface:BambooLicenseManagerChecks the maximum number of local agents allowed for the current license.- Specified by:
getAllowedNumberOfLocalAgentsin interfaceBambooLicenseManager- Returns:
- The maximum number of local agents allowed or -1 if not limited
-
getAllowedNumberOfPlans
public int getAllowedNumberOfPlans()Description copied from interface:BambooLicenseManagerChecks the maximum number of plans that can be created for the current license.- Specified by:
getAllowedNumberOfPlansin interfaceBambooLicenseManager- Returns:
- The maximum number of plans that can be created or -1 if not limited
-
getAllowedNumberOfPlans
Description copied from interface:BambooLicenseManagerChecks the maximum number of plans that can be created for the provided license- Specified by:
getAllowedNumberOfPlansin 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:BambooLicenseManagerLicense 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:
isStarterin interfaceBambooLicenseManager
-
isBasicEdition
public boolean isBasicEdition() -
isEvaluation
public boolean isEvaluation()- Specified by:
isEvaluationin interfaceBambooLicenseManager
-
isAcademic
public boolean isAcademic()- Specified by:
isAcademicin interfaceBambooLicenseManager
-
isDemonstration
public boolean isDemonstration()- Specified by:
isDemonstrationin interfaceBambooLicenseManager
-
isDeveloper
public boolean isDeveloper()- Specified by:
isDeveloperin interfaceBambooLicenseManager
-
isCommunity
public boolean isCommunity()- Specified by:
isCommunityin interfaceBambooLicenseManager
-
isOpenSource
public boolean isOpenSource()- Specified by:
isOpenSourcein interfaceBambooLicenseManager
-
isCommercial
public boolean isCommercial()- Specified by:
isCommercialin interfaceBambooLicenseManager
-
isDataCenter
public boolean isDataCenter()- Specified by:
isDataCenterin interfaceBambooLicenseManager
-