Class JwtLicenseInfo
- java.lang.Object
-
- jetbrains.buildServer.license.data.JwtLicenseInfo
-
- All Implemented Interfaces:
LicenseInfo
public class JwtLicenseInfo extends Object implements LicenseInfo
Implementation ofLicenseInfo
for licenses related to JetBrains Accounts, encoded in JWT form.
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.license.data.LicenseInfo
UNLIMITED_AGENTS_COUNT
-
-
Constructor Summary
Constructors Constructor Description JwtLicenseInfo(JwtLicenseInfoData jwtLicenseInfoData, ReleaseDateHolder releaseDateHolder, String key)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.license.data.LicenseInfo
describeLicense, describeVersion, isLicenseExpired, isTimeBasedLicense
-
-
-
-
Constructor Detail
-
JwtLicenseInfo
public JwtLicenseInfo(@NotNull JwtLicenseInfoData jwtLicenseInfoData, @NotNull ReleaseDateHolder releaseDateHolder, @NotNull String key)
-
-
Method Detail
-
setExpiredEnterprise
public void setExpiredEnterprise()
-
getOriginalLicenseDescription
@NotNull public String getOriginalLicenseDescription()
In JWT licensing, the type of license may change, seeServerLicenseType.JWT_EXPIRED_ENTERPRISE
. This method is similar toLicenseInfo.describeLicense()
, but returns the original license description adjusted for the UI.- Returns:
- see above
-
getLicensee
public String getLicensee()
- Specified by:
getLicensee
in interfaceLicenseInfo
-
getLicenseType
public int getLicenseType()
- Specified by:
getLicenseType
in interfaceLicenseInfo
-
getProductId
public int getProductId()
- Specified by:
getProductId
in interfaceLicenseInfo
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion
in interfaceLicenseInfo
-
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion
in interfaceLicenseInfo
-
getGenerationDate
public Date getGenerationDate()
- Specified by:
getGenerationDate
in interfaceLicenseInfo
-
getExpirationDate
public Date getExpirationDate()
- Specified by:
getExpirationDate
in interfaceLicenseInfo
-
getMaintenanceDueDate
public Date getMaintenanceDueDate()
- Specified by:
getMaintenanceDueDate
in interfaceLicenseInfo
-
getMaxNumberOfAgents
public int getMaxNumberOfAgents()
- Specified by:
getMaxNumberOfAgents
in interfaceLicenseInfo
- Returns:
- Available number of agents for
ServerLicenseType.ENTERPRISE_PER_USAGE
license to be used when license is *active* written in the license key.* Same asLicenseInfo.getNumberOfAgents()
for other license types.
-
getEffectiveMaxNumberOfAgents
public int getEffectiveMaxNumberOfAgents()
- Specified by:
getEffectiveMaxNumberOfAgents
in interfaceLicenseInfo
- Returns:
- Effective available number of agents for
ServerLicenseType.ENTERPRISE_PER_USAGE
license to be used when license is *active*. Can be bigger than th number in the key. Same asLicenseInfo.getEffectiveNumberOfAgents()
for other license types.
-
getNumberOfAgents
public int getNumberOfAgents()
- Specified by:
getNumberOfAgents
in interfaceLicenseInfo
- Returns:
- Number of available to use agents written in the license key. For
ServerLicenseType.ENTERPRISE_PER_USAGE
returns maximum available agents when the license is *inactive*.
-
getTruncatedAgentsUpgradeDueDate
@NotNull public Map<String,Integer> getTruncatedAgentsUpgradeDueDate()
-
getEffectiveNumberOfAgents
public int getEffectiveNumberOfAgents()
Description copied from interface:LicenseInfo
Effective number of agents (can be bigger than number written in the key)- Specified by:
getEffectiveNumberOfAgents
in interfaceLicenseInfo
- Returns:
-
getUniquePartOfKey
public String getUniquePartOfKey()
- Specified by:
getUniquePartOfKey
in interfaceLicenseInfo
-
getFormatVersion
@NotNull public String getFormatVersion()
-
getLicenseId
@NotNull public String getLicenseId()
-
getValidFrom
@NotNull public Date getValidFrom()
Returns date from when this license is valid.- Returns:
- see above
-
getInstPubKey
@NotNull public String getInstPubKey()
-
convertDateToJbaFormat
@NotNull public String convertDateToJbaFormat(@NotNull String formattedDate)
-
getJwtExpirationDate
@NotNull public Date getJwtExpirationDate()
Returns date when JWT token expires (defined by reserved 'exp' field). It is present for all licenses, even for not time-based.- Returns:
- see above
-
-