Class ValidationContext
java.lang.Object
com.itextpdf.signatures.validation.context.ValidationContext
Validation context class, which encapsulates specific context values, related to validation process.
-
Constructor Summary
ConstructorDescriptionValidationContext
(ValidatorContext validatorContext, CertificateSource certificateSource, TimeBasedContext timeBasedContext) CreateValidationContext
instance using provided context values. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Check if validation contexts chain contains specificCertificateSource
value.boolean
Check if the provided object is equal to this one.Get specific certificate source context value.Get previous validation context instance, from which this instance was created.Get specific time-based context value.Get specific validator context value.int
hashCode()
Return a hash code value for this validation context.setCertificateSource
(CertificateSource certificateSource) Create newValidationContext
instance with the provided certificate source context value.setTimeBasedContext
(TimeBasedContext timeBasedContext) Create newValidationContext
instance with the provided certificate source context value.setValidatorContext
(ValidatorContext validatorContext) Create newValidationContext
instance with the provided certificate source context value.toString()
Return string representation of thisValidationContext
.
-
Constructor Details
-
ValidationContext
public ValidationContext(ValidatorContext validatorContext, CertificateSource certificateSource, TimeBasedContext timeBasedContext) CreateValidationContext
instance using provided context values.- Parameters:
-
validatorContext
-ValidatorContext
value -
certificateSource
-CertificateSource
value -
timeBasedContext
-TimeBasedContext
value
-
-
Method Details
-
getPreviousValidationContext
Get previous validation context instance, from which this instance was created.- Returns:
-
previous
ValidatorContext
instance
-
getCertificateSource
Get specific certificate source context value.- Returns:
-
CertificateSource
context value
-
setCertificateSource
Create newValidationContext
instance with the provided certificate source context value.- Parameters:
-
certificateSource
-CertificateSource
value - Returns:
-
new
ValidationContext
instance
-
getTimeBasedContext
Get specific time-based context value.- Returns:
-
TimeBasedContext
context value
-
setTimeBasedContext
Create newValidationContext
instance with the provided certificate source context value.- Parameters:
-
timeBasedContext
-TimeBasedContext
value - Returns:
-
new
ValidationContext
instance
-
getValidatorContext
Get specific validator context value.- Returns:
-
ValidatorContext
context value
-
setValidatorContext
Create newValidationContext
instance with the provided certificate source context value.- Parameters:
-
validatorContext
-ValidatorContext
value - Returns:
-
new
ValidationContext
instance
-
checkIfContextChainContainsCertificateSource
public static boolean checkIfContextChainContainsCertificateSource(ValidationContext context, CertificateSource source) Check if validation contexts chain contains specificCertificateSource
value.- Parameters:
-
context
-ValidationContext
instance to start the check from -
source
-CertificateSource
value to check - Returns:
-
true
if validation contexts chain contains provided certificate source,false
otherwise
-
toString
Return string representation of thisValidationContext
. Previous validation context is not a part of this representation.- Overrides:
-
toString
in classObject
- Returns:
-
a string representation of the
ValidationContext
-
equals
Check if the provided object is equal to this one. Previous validation context field is not taken into account during this comparison. -
hashCode
public int hashCode()Return a hash code value for this validation context. Previous validation context field is not taken into account during hash code calculation.
-