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 Summary
ConstructorsConstructorDescriptionValidationResult(SignatureInfo signatureInfo, boolean integrityValid, boolean certificateValid, boolean chainValid, boolean timestampValid, String errorMessage) Creates an instance of aValidationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecertificateValidrecord component.booleanReturns the value of thechainValidrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theintegrityValidrecord component.invalid(SignatureInfo signatureInfo, String errorMessage) Creates an invalid result.booleanChecks if signature is fully valid.Returns the value of thesignatureInforecord component.booleanReturns the value of thetimestampValidrecord component.final StringtoString()Returns a string representation of this record class.valid(SignatureInfo signatureInfo) Creates a valid result.
-
Constructor Details
-
ValidationResult
public ValidationResult(SignatureInfo signatureInfo, boolean integrityValid, boolean certificateValid, boolean chainValid, boolean timestampValid, String errorMessage) Creates an instance of aValidationResultrecord class.- Parameters:
signatureInfo- the value for thesignatureInforecord componentintegrityValid- the value for theintegrityValidrecord componentcertificateValid- the value for thecertificateValidrecord componentchainValid- the value for thechainValidrecord componenttimestampValid- the value for thetimestampValidrecord componenterrorMessage- the value for theerrorMessagerecord component
-
-
Method Details
-
isFullyValid
public boolean isFullyValid()Checks if signature is fully valid. 检查签名是否完全有效。- Returns:
- true if all validations pass | 如果所有验证都通过返回 true
-
valid
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
-
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. -
signatureInfo
Returns the value of thesignatureInforecord component.- Returns:
- the value of the
signatureInforecord component
-
integrityValid
public boolean integrityValid()Returns the value of theintegrityValidrecord component.- Returns:
- the value of the
integrityValidrecord component
-
certificateValid
public boolean certificateValid()Returns the value of thecertificateValidrecord component.- Returns:
- the value of the
certificateValidrecord component
-
chainValid
public boolean chainValid()Returns the value of thechainValidrecord component.- Returns:
- the value of the
chainValidrecord component
-
timestampValid
public boolean timestampValid()Returns the value of thetimestampValidrecord component.- Returns:
- the value of the
timestampValidrecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-