Package io.keikai.axyra.sheets
Record Class LicenseInfo
java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.LicenseInfo
- Record Components:
state- the currentLicenseStatusedition- the product edition (e.g."Enterprise"), ornullwhen unlicensedlicensee- the licensee name, ornullwhen unlicensedfeatures- the enabled feature flags (nevernull; empty when unlicensed)expiresAt- the expiry in Unix seconds (not the millisecondsSystem.currentTimeMillis()uses), ornullfor perpetual / unlicensed;expiresAtInstant()gives it as anInstantreason- why a supplied token is not in force (expired, malformed, untrusted signature, revoked, wrong product or platform, an embedded OEM token, …) whenstateisLicenseStatus.EXPIREDorLicenseStatus.INVALID; otherwisenullproduct- the product id the key licenses ("axyra-sheets"), ornullwhen unlicensedplatform- the SDK platform the key is restricted to ("java","dotnet", …), ornullfor every platform / unlicensedlicenseType- the commercial license type ("Evaluation","Developer (Internal Use)","OEM/SaaS","Custom"), ornullwhen the key predates the field / unlicensedlicenseCount- how much the purchase covers, count and unit as text ("5 developers","2 servers","unlimited"), ornullcustomerId- the customer's id in the licensor's sales system, ornullcertificateNo- the license certificate number, ornull(evaluation keys carry none)keyUsage- what the key is for ("development","deployment", …), ornulllicenseId- the key's unique id (quote it in support requests), ornullvalidFrom- the start of validity in Unix seconds, ornullfor no lower bound / unlicensedmaintenanceUntil- the maintenance end of a perpetual key in Unix seconds — engine builds released after it are not covered — ornullwhen there is none / unlicensed
public record LicenseInfo(LicenseStatus state, String edition, String licensee, List<String> features, Long expiresAt, String reason, String product, String platform, String licenseType, String licenseCount, String customerId, String certificateNo, String keyUsage, String licenseId, Long validFrom, Long maintenanceUntil)
extends Record
A snapshot of the engine's licensing status.
Beyond the state, the record carries what the key says about itself:
who it was issued to, what product and platform it covers, its commercial
type, and the validity window. Everything but product() and
platform() is informational — the engine shows it, the EULA
carries the terms.
-
Constructor Summary
ConstructorsConstructorDescriptionLicenseInfo(LicenseStatus state, String edition, String licensee, List<String> features, Long expiresAt) A status without areason()(the shape before the reason was carried).LicenseInfo(LicenseStatus state, String edition, String licensee, List<String> features, Long expiresAt, String reason) A status with the fields the record carried before the key details were added.LicenseInfo(LicenseStatus state, String edition, String licensee, List<String> features, Long expiresAt, String reason, String product, String platform, String licenseType, String licenseCount, String customerId, String certificateNo, String keyUsage, String licenseId, Long validFrom, Long maintenanceUntil) Creates an instance of aLicenseInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecertificateNorecord component.Returns the value of thecustomerIdrecord component.edition()Returns the value of theeditionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.The expiry as anInstant, ornullfor perpetual / unlicensed.features()Returns the value of thefeaturesrecord component.booleanhasFeature(String feature) Whether this license enablesfeature("*"is a wildcard).final inthashCode()Returns a hash code value for this object.booleanWhether a valid license is in force (LicenseStatus.LICENSEDorLicenseStatus.GRACE).booleanWhether the key never expires on the clock (a licensed state with noexpiresAt()).keyUsage()Returns the value of thekeyUsagerecord component.Returns the value of thelicenseCountrecord component.licensee()Returns the value of thelicenseerecord component.Returns the value of thelicenseIdrecord component.Returns the value of thelicenseTyperecord component.Returns the value of themaintenanceUntilrecord component.The maintenance end as anInstant, ornullwhen there is none.platform()Returns the value of theplatformrecord component.product()Returns the value of theproductrecord component.reason()Returns the value of thereasonrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevalidFromrecord component.The start of validity as anInstant, ornullfor no lower bound / unlicensed.
-
Constructor Details
-
LicenseInfo
public LicenseInfo(LicenseStatus state, String edition, String licensee, List<String> features, Long expiresAt) A status without areason()(the shape before the reason was carried). -
LicenseInfo
public LicenseInfo(LicenseStatus state, String edition, String licensee, List<String> features, Long expiresAt, String reason) A status with the fields the record carried before the key details were added. -
LicenseInfo
public LicenseInfo(LicenseStatus state, String edition, String licensee, List<String> features, Long expiresAt, String reason, String product, String platform, String licenseType, String licenseCount, String customerId, String certificateNo, String keyUsage, String licenseId, Long validFrom, Long maintenanceUntil) Creates an instance of aLicenseInforecord class.- Parameters:
state- the value for thestaterecord componentedition- the value for theeditionrecord componentlicensee- the value for thelicenseerecord componentfeatures- the value for thefeaturesrecord componentexpiresAt- the value for theexpiresAtrecord componentreason- the value for thereasonrecord componentproduct- the value for theproductrecord componentplatform- the value for theplatformrecord componentlicenseType- the value for thelicenseTyperecord componentlicenseCount- the value for thelicenseCountrecord componentcustomerId- the value for thecustomerIdrecord componentcertificateNo- the value for thecertificateNorecord componentkeyUsage- the value for thekeyUsagerecord componentlicenseId- the value for thelicenseIdrecord componentvalidFrom- the value for thevalidFromrecord componentmaintenanceUntil- the value for themaintenanceUntilrecord component
-
-
Method Details
-
expiresAtInstant
The expiry as anInstant, ornullfor perpetual / unlicensed. -
validFromInstant
The start of validity as anInstant, ornullfor no lower bound / unlicensed. -
maintenanceUntilInstant
The maintenance end as anInstant, ornullwhen there is none. -
isPerpetual
public boolean isPerpetual()Whether the key never expires on the clock (a licensed state with noexpiresAt()). -
hasFeature
Whether this license enablesfeature("*"is a wildcard). -
isLicensed
public boolean isLicensed()Whether a valid license is in force (LicenseStatus.LICENSEDorLicenseStatus.GRACE). -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
edition
Returns the value of theeditionrecord component.- Returns:
- the value of the
editionrecord component
-
licensee
Returns the value of thelicenseerecord component.- Returns:
- the value of the
licenseerecord component
-
features
Returns the value of thefeaturesrecord component.- Returns:
- the value of the
featuresrecord component
-
expiresAt
Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
product
Returns the value of theproductrecord component.- Returns:
- the value of the
productrecord component
-
platform
Returns the value of theplatformrecord component.- Returns:
- the value of the
platformrecord component
-
licenseType
Returns the value of thelicenseTyperecord component.- Returns:
- the value of the
licenseTyperecord component
-
licenseCount
Returns the value of thelicenseCountrecord component.- Returns:
- the value of the
licenseCountrecord component
-
customerId
Returns the value of thecustomerIdrecord component.- Returns:
- the value of the
customerIdrecord component
-
certificateNo
Returns the value of thecertificateNorecord component.- Returns:
- the value of the
certificateNorecord component
-
keyUsage
Returns the value of thekeyUsagerecord component.- Returns:
- the value of the
keyUsagerecord component
-
licenseId
Returns the value of thelicenseIdrecord component.- Returns:
- the value of the
licenseIdrecord component
-
validFrom
Returns the value of thevalidFromrecord component.- Returns:
- the value of the
validFromrecord component
-
maintenanceUntil
Returns the value of themaintenanceUntilrecord component.- Returns:
- the value of the
maintenanceUntilrecord component
-