Class ServerLicenseList

    • Method Detail

      • addLicense

        public void addLicense​(@NotNull
                               LicenseKey newKey)
      • setJwtLicense

        public void setJwtLicense​(@NotNull
                                  JwtLicenseKey key)
      • removeJwtLicense

        public void removeJwtLicense()
      • hasEnterpriseLicense

        public boolean hasEnterpriseLicense()
        Specified by:
        hasEnterpriseLicense in interface LicenseList
        Returns:
        true if there is an active enterprise license.
      • hasJwtLicense

        public boolean hasJwtLicense()
        Specified by:
        hasJwtLicense in interface LicenseList
        Returns:
        true if there is a JWT license (either active or inactive)
      • getJwtLicense

        @Nullable
        public JwtLicenseKey getJwtLicense()
        Specified by:
        getJwtLicense in interface LicenseList
        Returns:
        JWT license if it's present (can be inactive), null otherwise
      • getInactiveLicenses

        @NotNull
        public Collection<LicenseKey> getInactiveLicenses()
        Specified by:
        getInactiveLicenses in interface LicenseList
        Returns:
        inactive license keys - expired trial keys, keys with expired maintenance comparing to server release date. Note that list can also have non expired trial license if valid enterprise license exists.
      • getLicensedAgentCount

        public int getLicensedAgentCount()
        Specified by:
        getLicensedAgentCount in interface LicenseList
        Returns:
        computes number of agents from the entered license keys.
      • contains

        public boolean contains​(LicenseKey key)
      • isTrialMode

        public boolean isTrialMode()
        Description copied from interface: LicenseList
        Returns true if server is working in trial mode.
        Specified by:
        isTrialMode in interface LicenseList
        Returns:
      • isEAPTrialMode

        public boolean isEAPTrialMode()
        Description copied from interface: LicenseList
        Returns true if server is working in trial mode.
        Specified by:
        isEAPTrialMode in interface LicenseList
        Returns:
      • isOpenSourceMode

        public boolean isOpenSourceMode()
        Description copied from interface: LicenseList
        Returns true if server is working in open source evaluation mode.
        Specified by:
        isOpenSourceMode in interface LicenseList
        Returns:
      • isUnlimitedAgents

        public boolean isUnlimitedAgents()
        Description copied from interface: LicenseList
        Returns true if server is working in the unlimited agents mode.
        Specified by:
        isUnlimitedAgents in interface LicenseList
        Returns:
      • isPerUsageMode

        public boolean isPerUsageMode()
        Specified by:
        isPerUsageMode in interface LicenseList
        Returns:
        true if server is working in PerUsage enterprise mode. isPerUsageLicenseActive() should be checked as well.
      • isPerUsageLicenseActive

        public boolean isPerUsageLicenseActive()
        Specified by:
        isPerUsageLicenseActive in interface LicenseList
        Returns:
        true if PerUsage enterprise mode is active - usage data was sent to the JetProfile recently or server was just restarted or key was just added.
      • isUnlimitedBuildTypes

        public boolean isUnlimitedBuildTypes()
        Specified by:
        isUnlimitedBuildTypes in interface LicenseList
        Returns:
        true if number of build types is unlimited
      • getNumberOfPredefinedAgents

        public int getNumberOfPredefinedAgents()
        Description copied from interface: LicenseList
        Returns number of agents which can be authorized on the server for free (currently it is either 3 or 0 if number is unlimited). Returns 0 if number of agents is unlimited.
        Specified by:
        getNumberOfPredefinedAgents in interface LicenseList
        Returns:
        number of predefined agents
      • getNumberOfPredefinedBuildTypes

        public int getNumberOfPredefinedBuildTypes()
        Description copied from interface: LicenseList
        Returns number of predefined build configurations which can be created on the server (currently it is either 20 or 0 if number is unlimited).
        Specified by:
        getNumberOfPredefinedBuildTypes in interface LicenseList
        Returns:
        number of predefined agents
      • getReleaseDate

        @NotNull
        public Date getReleaseDate()
        Specified by:
        getReleaseDate in interface LicenseList
        Returns:
        release date of the server