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, …) whenstateisLicenseStatus.EVALUATION; otherwisenull
public record LicenseInfo(LicenseStatus state, String edition, String licensee, List<String> features, Long expiresAt, String reason)
extends Record
A snapshot of the engine's licensing status.
-
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) Creates an instance of aLicenseInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionedition()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).licensee()Returns the value of thelicenseerecord 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.
-
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) 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 component
-
-
Method Details
-
expiresAtInstant
The expiry as anInstant, ornullfor perpetual / unlicensed. -
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
-