Record Class DesignerLicenseGate.Facts
java.lang.Object
java.lang.Record
com.iizix.license.DesignerLicenseGate.Facts
- Record Components:
reply- The reply ofvalidate(); null is read asValidateReply.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'sissued, milliseconds since the epoch, zero for none.trialUntil- The document'strialUntil, zero for none.validFrom- The document'svalidFrom, zero for none.validTo- The document'svalidTo, zero for none.expires- The document'sexpires, 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 Summary
ConstructorsConstructorDescriptionFacts(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 aFactsrecord class.Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountNamerecord component.final booleanIndicates whether some other object is "equal to" this one.longexpires()Returns the value of theexpiresrecord component.booleanReturns the value of thehasDeveloperIDrecord component.booleanReturns the value of thehasDocumentrecord component.final inthashCode()Returns a hash code value for this object.longissued()Returns the value of theissuedrecord component.longReturns the value of thelocalTrialEndrecord component.longnow()Returns the value of thenowrecord component.static DesignerLicenseGate.Factsof(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.reply()Returns the value of thereplyrecord component.booleanReturns the value of theserverConfiguredrecord component.booleanReturns the value of theserverVerifiablerecord component.final StringtoString()Returns a string representation of this record class.booleantrial()Returns the value of thetrialrecord component.longReturns the value of thetrialUntilrecord component.longReturns the value of thevalidFromrecord component.longvalidTo()Returns the value of thevalidTorecord component.
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 aFactsrecord class.- Parameters:
reply- the value for thereplyrecord componenthasDocument- the value for thehasDocumentrecord componenttrial- the value for thetrialrecord componentaccountName- the value for theaccountNamerecord componentissued- the value for theissuedrecord componenttrialUntil- the value for thetrialUntilrecord componentvalidFrom- the value for thevalidFromrecord componentvalidTo- the value for thevalidTorecord componentexpires- the value for theexpiresrecord componenthasDeveloperID- the value for thehasDeveloperIDrecord componentserverConfigured- the value for theserverConfiguredrecord componentserverVerifiable- the value for theserverVerifiablerecord componentlocalTrialEnd- the value for thelocalTrialEndrecord componentnow- the value for thenowrecord 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 ofvalidate().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
hashCode
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes.reply
hasDocument
public boolean hasDocument()Returns the value of thehasDocumentrecord component.- Returns:
- the value of the
hasDocumentrecord component
trial
accountName
Returns the value of theaccountNamerecord component.- Returns:
- the value of the
accountNamerecord component
issued
trialUntil
public long trialUntil()Returns the value of thetrialUntilrecord component.- Returns:
- the value of the
trialUntilrecord component
validFrom
validTo
expires
hasDeveloperID
public boolean hasDeveloperID()Returns the value of thehasDeveloperIDrecord component.- Returns:
- the value of the
hasDeveloperIDrecord component
serverConfigured
public boolean serverConfigured()Returns the value of theserverConfiguredrecord component.- Returns:
- the value of the
serverConfiguredrecord component
serverVerifiable
public boolean serverVerifiable()Returns the value of theserverVerifiablerecord component.- Returns:
- the value of the
serverVerifiablerecord component
localTrialEnd
public long localTrialEnd()Returns the value of thelocalTrialEndrecord component.- Returns:
- the value of the
localTrialEndrecord component
now