Record Class DesignerLicenseGate.Facts

java.lang.Object
java.lang.Record
com.iizix.license.DesignerLicenseGate.Facts
Record Components:
reply - The reply of validate(); null is read as ValidateReply.BROKEN.
hasDocument - true when a verified licence document is held.
trial - true when the document's state is a trial.
accountName - The document's account, null for none.
issued - The document's issued, milliseconds since the epoch, zero for none.
trialUntil - The document's trialUntil, zero for none.
validFrom - The document's validFrom, zero for none.
validTo - The document's validTo, zero for none.
expires - The document's expires, zero for none.
hasDeveloperID - true when a Developer ID or a Developer Group ID is known.
serverConfigured - true when the licence client has a licence server to contact.
serverVerifiable - true when this build can verify a licence server: it has a root key.
localTrialEnd - When the trial period of an installation without a document ends, counted by the installation itself; zero for none.
now - The instant, milliseconds since the epoch.
Enclosing class:
DesignerLicenseGate

public static record DesignerLicenseGate.Facts(ValidateReply reply, boolean hasDocument, boolean trial, String accountName, long issued, long trialUntil, long validFrom, long validTo, long expires, boolean hasDeveloperID, boolean serverConfigured, boolean serverVerifiable, long localTrialEnd, long now) extends Record
What the licence system says about the installation at one instant.
Author:
Christopher Mindus
  • Constructor Details

    • Facts

      public Facts(ValidateReply reply, boolean hasDocument, boolean trial, String accountName, long issued, long trialUntil, long validFrom, long validTo, long expires, boolean hasDeveloperID, boolean serverConfigured, boolean serverVerifiable, long localTrialEnd, long now)
      Creates an instance of a Facts record class.
      Parameters:
      reply - the value for the reply record component
      hasDocument - the value for the hasDocument record component
      trial - the value for the trial record component
      accountName - the value for the accountName record component
      issued - the value for the issued record component
      trialUntil - the value for the trialUntil record component
      validFrom - the value for the validFrom record component
      validTo - the value for the validTo record component
      expires - the value for the expires record component
      hasDeveloperID - the value for the hasDeveloperID record component
      serverConfigured - the value for the serverConfigured record component
      serverVerifiable - the value for the serverVerifiable record component
      localTrialEnd - the value for the localTrialEnd record component
      now - the value for the now record component
  • Method Details

    • of

      public static DesignerLicenseGate.Facts of(ValidateReply reply, LicenseDocument document, boolean hasDeveloperID, boolean serverConfigured, boolean serverVerifiable, long trialStarted, long trialDuration, long trialExtension, long now)
      Reads the facts from what a licence system answers.
      Parameters:
      reply - The reply of validate().
      document - The licence document held, null for none.
      hasDeveloperID - true when a Developer ID or a Developer Group ID is known.
      serverConfigured - true when a licence server is configured.
      serverVerifiable - true when this build can verify a licence server.
      trialStarted - When the installation's own trial started, negative for none.
      trialDuration - Its duration in milliseconds, negative for none.
      trialExtension - The extension granted, zero for none.
      now - The instant.
      Returns:
      The facts.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • reply

      public ValidateReply reply()
      Returns the value of the reply record component.
      Returns:
      the value of the reply record component
    • hasDocument

      public boolean hasDocument()
      Returns the value of the hasDocument record component.
      Returns:
      the value of the hasDocument record component
    • trial

      public boolean trial()
      Returns the value of the trial record component.
      Returns:
      the value of the trial record component
    • accountName

      public String accountName()
      Returns the value of the accountName record component.
      Returns:
      the value of the accountName record component
    • issued

      public long issued()
      Returns the value of the issued record component.
      Returns:
      the value of the issued record component
    • trialUntil

      public long trialUntil()
      Returns the value of the trialUntil record component.
      Returns:
      the value of the trialUntil record component
    • validFrom

      public long validFrom()
      Returns the value of the validFrom record component.
      Returns:
      the value of the validFrom record component
    • validTo

      public long validTo()
      Returns the value of the validTo record component.
      Returns:
      the value of the validTo record component
    • expires

      public long expires()
      Returns the value of the expires record component.
      Returns:
      the value of the expires record component
    • hasDeveloperID

      public boolean hasDeveloperID()
      Returns the value of the hasDeveloperID record component.
      Returns:
      the value of the hasDeveloperID record component
    • serverConfigured

      public boolean serverConfigured()
      Returns the value of the serverConfigured record component.
      Returns:
      the value of the serverConfigured record component
    • serverVerifiable

      public boolean serverVerifiable()
      Returns the value of the serverVerifiable record component.
      Returns:
      the value of the serverVerifiable record component
    • localTrialEnd

      public long localTrialEnd()
      Returns the value of the localTrialEnd record component.
      Returns:
      the value of the localTrialEnd record component
    • now

      public long now()
      Returns the value of the now record component.
      Returns:
      the value of the now record component