Class SecureJBAClient

    • Method Detail

      • linkAgents

        public void linkAgents()
                        throws LicensesLinkageException
        Description copied from interface: JBAClient
        Attempts to send data about existing license keys with JetBrains Accounts. This allows JBA to create a license with all purchased agents beforehand.
        Specified by:
        linkAgents in interface JBAClient
        Throws:
        LicensesLinkageException - on any linkage or connection issues
      • getActivationUrl

        @NotNull
        public URL getActivationUrl()
        Description copied from interface: JBAClient
        Generates and returns product activation URL Representation: LICENSE_URL/activate?product=...&instPubKey=...&selfSign=...
        Specified by:
        getActivationUrl in interface JBAClient
        Returns:
        see above
      • getDeactivationUrl

        @NotNull
        public URL getDeactivationUrl​(@NotNull
                                      JwtLicenseKey licenseToDeactivate)
        Description copied from interface: JBAClient
        Generates and returns product deactivation URL Representation: LICENSE_URL/license/deactivate?product=...&instPubKey=...&selfSign=...&licenseKey=...
        Specified by:
        getDeactivationUrl in interface JBAClient
        Parameters:
        licenseToDeactivate - license to deactivate
        Returns:
        see above
      • getTeamUrl

        @Nullable
        public URL getTeamUrl​(@NotNull
                              JwtLicenseKey licenseKey)
        Description copied from interface: JBAClient
        Returns URL to the JBA team, which owns given license key. Returns null if given key has invalid data, from which this URL cannot be determined.
        Specified by:
        getTeamUrl in interface JBAClient
        Parameters:
        licenseKey - license key
        Returns:
        see above
      • getGracePeriodEnd

        @Nullable
        public Date getGracePeriodEnd()
        Description copied from interface: JBAClient
        If the current JWT license was invalidated by the JBA verification process, but it's not suspended yet on TeamCity's side, returns the date, when this license will become invalid.

        Otherwise, returns null.

        Specified by:
        getGracePeriodEnd in interface JBAClient
        Returns:
        see above
      • getLastUpdateTime

        public long getLastUpdateTime()
        Description copied from interface: JBAClient
        Returns last license update time if the license is configured. Returns -1 if no JWT license is present, or it was not updated yet.
        Specified by:
        getLastUpdateTime in interface JBAClient
        Returns:
        see above
      • getLastUpdateErrorMessage

        @Nullable
        public String getLastUpdateErrorMessage()
        Description copied from interface: JBAClient
        Returns human-readable description of last license verification error or null, if last verification was successful.
        Specified by:
        getLastUpdateErrorMessage in interface JBAClient
        Returns:
        see above
      • startLicenseObtain

        public void startLicenseObtain()
        Description copied from interface: JBAClient
        Launches a periodical task which calls JBA and checks, whether user has completed the license activation on their side. If the activation is completed, this task obtains the license and installs it into TeamCity. This task is stopped when encountered errors that differ from "unavailable license" reason. Other stop conditions (e.g. max attempts, license already exists) may apply.

        There can be only one obtain task at a time. If called when a task is active, stops the current task and launches a new one.

        Specified by:
        startLicenseObtain in interface JBAClient