Record Class UpdateVerifier.Result

java.lang.Object
java.lang.Record
com.iizix.server.tools.UpdateVerifier.Result
Record Components:
ok - true when the package may be installed.
reason - Why not, null when ok.
build - The package's build (the version string of its server jar), null when not found.
signer - The subject of the signing certificate, null for an unsigned package.
signed - true when every entry is signed by one chain.
timestamp - The date of the signature's timestamp, null without one.
entries - The number of entries verified.
warnings - What was noticed and allowed.
flavour - The package's flavour (DistributionFlavour), null before its server jar was read.
Enclosing class:
UpdateVerifier

public static record UpdateVerifier.Result(boolean ok, String reason, String build, String signer, boolean signed, Date timestamp, int entries, List<String> warnings, String flavour) extends Record
What the verification found.
Author:
Christopher Mindus
  • Constructor Details

    • Result

      public Result(boolean ok, String reason, String build, String signer, boolean signed, Date timestamp, int entries, List<String> warnings)
      A result before the package's flavour is known.
    • Result

      public Result(boolean ok, String reason, String build, String signer, boolean signed, Date timestamp, int entries, List<String> warnings, String flavour)
      Creates an instance of a Result record class.
      Parameters:
      ok - the value for the ok record component
      reason - the value for the reason record component
      build - the value for the build record component
      signer - the value for the signer record component
      signed - the value for the signed record component
      timestamp - the value for the timestamp record component
      entries - the value for the entries record component
      warnings - the value for the warnings record component
      flavour - the value for the flavour record component
  • Method Details

    • 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.
    • ok

      public boolean ok()
      Returns the value of the ok record component.
      Returns:
      the value of the ok record component
    • reason

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

      public String build()
      Returns the value of the build record component.
      Returns:
      the value of the build record component
    • signer

      public String signer()
      Returns the value of the signer record component.
      Returns:
      the value of the signer record component
    • signed

      public boolean signed()
      Returns the value of the signed record component.
      Returns:
      the value of the signed record component
    • timestamp

      public Date timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • entries

      public int entries()
      Returns the value of the entries record component.
      Returns:
      the value of the entries record component
    • warnings

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

      public String flavour()
      Returns the value of the flavour record component.
      Returns:
      the value of the flavour record component