Class BambooLicenseManagerImpl

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

public class BambooLicenseManagerImpl extends Object implements BambooLicenseManager
  • Field Details

  • Constructor Details

    • BambooLicenseManagerImpl

      public BambooLicenseManagerImpl(@NotNull @NotNull BootstrapManager bootstrapManager)
  • 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 interface BambooLicenseManager
      Returns:
      BambooLicense if exists or null if no license exists.
    • getLicenseString

      @Nullable public @Nullable String getLicenseString()
    • setLicense

      public void setLicense(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(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 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(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()
      Description copied from interface: BambooLicenseManager
      License type checks

      Note: 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 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
    • isDataCenter

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