Record Class SignatureValidator.ValidationResult

java.lang.Object
java.lang.Record
cloud.opencode.base.pdf.signature.SignatureValidator.ValidationResult
Record Components:
signatureInfo - signature information | 签名信息
integrityValid - whether document integrity is valid | 文档完整性是否有效
certificateValid - whether certificate is valid | 证书是否有效
chainValid - whether certificate chain is valid | 证书链是否有效
timestampValid - whether timestamp is valid | 时间戳是否有效
errorMessage - error message if any | 错误消息
Enclosing class:
SignatureValidator

public static record SignatureValidator.ValidationResult(SignatureInfo signatureInfo, boolean integrityValid, boolean certificateValid, boolean chainValid, boolean timestampValid, String errorMessage) extends Record
Signature Validation Result 签名验证结果
Since:
JDK 25, opencode-base-pdf V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • ValidationResult

      public ValidationResult(SignatureInfo signatureInfo, boolean integrityValid, boolean certificateValid, boolean chainValid, boolean timestampValid, String errorMessage)
      Creates an instance of a ValidationResult record class.
      Parameters:
      signatureInfo - the value for the signatureInfo record component
      integrityValid - the value for the integrityValid record component
      certificateValid - the value for the certificateValid record component
      chainValid - the value for the chainValid record component
      timestampValid - the value for the timestampValid record component
      errorMessage - the value for the errorMessage record component
  • Method Details

    • isFullyValid

      public boolean isFullyValid()
      Checks if signature is fully valid. 检查签名是否完全有效。
      Returns:
      true if all validations pass | 如果所有验证都通过返回 true
    • valid

      public static SignatureValidator.ValidationResult valid(SignatureInfo signatureInfo)
      Creates a valid result. 创建有效结果。
      Parameters:
      signatureInfo - signature information | 签名信息
      Returns:
      valid result | 有效结果
    • invalid

      public static SignatureValidator.ValidationResult invalid(SignatureInfo signatureInfo, String errorMessage)
      Creates an invalid result. 创建无效结果。
      Parameters:
      signatureInfo - signature information | 签名信息
      errorMessage - error message | 错误消息
      Returns:
      invalid result | 无效结果
    • 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.
    • signatureInfo

      public SignatureInfo signatureInfo()
      Returns the value of the signatureInfo record component.
      Returns:
      the value of the signatureInfo record component
    • integrityValid

      public boolean integrityValid()
      Returns the value of the integrityValid record component.
      Returns:
      the value of the integrityValid record component
    • certificateValid

      public boolean certificateValid()
      Returns the value of the certificateValid record component.
      Returns:
      the value of the certificateValid record component
    • chainValid

      public boolean chainValid()
      Returns the value of the chainValid record component.
      Returns:
      the value of the chainValid record component
    • timestampValid

      public boolean timestampValid()
      Returns the value of the timestampValid record component.
      Returns:
      the value of the timestampValid record component
    • errorMessage

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