Record Class LicenseInfo

java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.LicenseInfo
Record Components:
state - the current LicenseStatus
edition - the product edition (e.g. "Enterprise"), or null when unlicensed
licensee - the licensee name, or null when unlicensed
features - the enabled feature flags (never null; empty when unlicensed)
expiresAt - the expiry in Unix seconds (not the milliseconds System.currentTimeMillis() uses), or null for perpetual / unlicensed; expiresAtInstant() gives it as an Instant
reason - why a supplied token is not in force (expired, malformed, untrusted signature, revoked, wrong product or platform, an embedded OEM token, …) when state is LicenseStatus.EVALUATION; otherwise null
product - the product id the key licenses ("axyra-sheets"), or null when unlicensed
platform - the SDK platform the key is restricted to ("java", "dotnet", …), or null for every platform / unlicensed
licenseType - the commercial license type ("Evaluation", "Developer (Internal Use)", "OEM/SaaS", "Custom"), or null when the key predates the field / unlicensed
licensedDevelopers - how many developers the purchase covers, as text ("5", "unlimited"), or null
customerId - the customer's id in the licensor's sales system, or null
certificateNo - the license certificate number, or null (evaluation keys carry none)
keyUsage - what the key is for ("development", "deployment", …), or null
licenseId - the key's unique id (quote it in support requests), or null
validFrom - the start of validity in Unix seconds, or null for no lower bound / unlicensed
maintenanceUntil - the maintenance end of a perpetual key in Unix seconds — engine builds released after it are not covered — or null when 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 licensedDevelopers, 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 Details

    • LicenseInfo

      public LicenseInfo(LicenseStatus state, String edition, String licensee, List<String> features, Long expiresAt)
      A status without a reason() (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 licensedDevelopers, String customerId, String certificateNo, String keyUsage, String licenseId, Long validFrom, Long maintenanceUntil)
      Creates an instance of a LicenseInfo record class.
      Parameters:
      state - the value for the state record component
      edition - the value for the edition record component
      licensee - the value for the licensee record component
      features - the value for the features record component
      expiresAt - the value for the expiresAt record component
      reason - the value for the reason record component
      product - the value for the product record component
      platform - the value for the platform record component
      licenseType - the value for the licenseType record component
      licensedDevelopers - the value for the licensedDevelopers record component
      customerId - the value for the customerId record component
      certificateNo - the value for the certificateNo record component
      keyUsage - the value for the keyUsage record component
      licenseId - the value for the licenseId record component
      validFrom - the value for the validFrom record component
      maintenanceUntil - the value for the maintenanceUntil record component
  • Method Details

    • expiresAtInstant

      public Instant expiresAtInstant()
      The expiry as an Instant, or null for perpetual / unlicensed.
    • validFromInstant

      public Instant validFromInstant()
      The start of validity as an Instant, or null for no lower bound / unlicensed.
    • maintenanceUntilInstant

      public Instant maintenanceUntilInstant()
      The maintenance end as an Instant, or null when there is none.
    • isPerpetual

      public boolean isPerpetual()
      Whether the key never expires on the clock (a licensed state with no expiresAt()).
    • hasFeature

      public boolean hasFeature(String feature)
      Whether this license enables feature ("*" is a wildcard).
    • isLicensed

      public boolean isLicensed()
      Whether a valid license is in force (LicenseStatus.LICENSED or LicenseStatus.GRACE).
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • state

      public LicenseStatus state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • edition

      public String edition()
      Returns the value of the edition record component.
      Returns:
      the value of the edition record component
    • licensee

      public String licensee()
      Returns the value of the licensee record component.
      Returns:
      the value of the licensee record component
    • features

      public List<String> features()
      Returns the value of the features record component.
      Returns:
      the value of the features record component
    • expiresAt

      public Long expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • product

      public String product()
      Returns the value of the product record component.
      Returns:
      the value of the product record component
    • platform

      public String platform()
      Returns the value of the platform record component.
      Returns:
      the value of the platform record component
    • licenseType

      public String licenseType()
      Returns the value of the licenseType record component.
      Returns:
      the value of the licenseType record component
    • licensedDevelopers

      public String licensedDevelopers()
      Returns the value of the licensedDevelopers record component.
      Returns:
      the value of the licensedDevelopers record component
    • customerId

      public String customerId()
      Returns the value of the customerId record component.
      Returns:
      the value of the customerId record component
    • certificateNo

      public String certificateNo()
      Returns the value of the certificateNo record component.
      Returns:
      the value of the certificateNo record component
    • keyUsage

      public String keyUsage()
      Returns the value of the keyUsage record component.
      Returns:
      the value of the keyUsage record component
    • licenseId

      public String licenseId()
      Returns the value of the licenseId record component.
      Returns:
      the value of the licenseId record component
    • validFrom

      public Long validFrom()
      Returns the value of the validFrom record component.
      Returns:
      the value of the validFrom record component
    • maintenanceUntil

      public Long maintenanceUntil()
      Returns the value of the maintenanceUntil record component.
      Returns:
      the value of the maintenanceUntil record component