Class SignatureValidationProperties
java.lang.Object
com.itextpdf.signatures.validation.v1.SignatureValidationProperties
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
static enum
Enum representing possible online fetching permissions. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
static final Duration
static final Duration
static final Duration
static final SignatureValidationProperties.OnlineFetching
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getContinueAfterFailure
(ValidationContext validationContext) Returns the Continue after failure setting for the provided context or the default context.getFreshness
(ValidationContext validationContext) Returns the freshness setting for the provided validation context or the default context in milliseconds.(package private) <T> T
getParametersValueFor
(ValidatorContext validatorContext, CertificateSource certSource, TimeBasedContext timeBasedContext, Function<SignatureValidationProperties.ContextProperties, T> getter) This method executes the getter method to the most granular parameters set down until the getter returns a non-null valuegetRequiredExtensions
(ValidationContext validationContext) Returns required extension for the provided validation context.getRevocationOnlineFetching
(ValidationContext validationContext) Sets the onlineFetching property representing possible online fetching permissions.setContinueAfterFailure
(ValidatorContexts validatorContexts, CertificateSources certificateSources, boolean value) Sets the Continue after failure setting for the provided context.setFreshness
(ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, Duration value) Sets the freshness setting for the specified validator, time based and certificate source contexts in milliseconds.(package private) final void
setParameterValueFor
(EnumSet<ValidatorContext> validatorContexts, EnumSet<CertificateSource> certificateSources, EnumSet<TimeBasedContext> timeBasedContexts, Consumer<SignatureValidationProperties.ContextProperties> setter) This method executes the setter method for every combination of selected validators and certificateSources(package private) final SignatureValidationProperties
setRequiredExtensions
(CertificateSources certificateSources, List<CertificateExtension> requiredExtensions) setRevocationOnlineFetching
(ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, SignatureValidationProperties.OnlineFetching onlineFetching) Sets the onlineFetching property representing possible online fetching permissions.
-
Field Details
-
DEFAULT_CONTINUE_AFTER_FAILURE
public static final boolean DEFAULT_CONTINUE_AFTER_FAILURE- See Also:
-
DEFAULT_FRESHNESS_PRESENT_CRL
-
DEFAULT_FRESHNESS_PRESENT_OCSP
-
DEFAULT_FRESHNESS_HISTORICAL
-
DEFAULT_ONLINE_FETCHING
-
properties
-
-
Constructor Details
-
SignatureValidationProperties
public SignatureValidationProperties()
-
-
Method Details
-
getFreshness
Returns the freshness setting for the provided validation context or the default context in milliseconds.- Parameters:
validationContext
- the validation context for which to retrieve the freshness setting- Returns:
- the freshness setting for the provided validation context or the default context in milliseconds
-
setFreshness
public final SignatureValidationProperties setFreshness(ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, Duration value) Sets the freshness setting for the specified validator, time based and certificate source contexts in milliseconds.- Parameters:
validatorContexts
- the validators for which to apply the settingcertificateSources
- the certificate sources totimeBasedContexts
- the date comparison context for which to apply the settingvalue
- the settings value in milliseconds- Returns:
- this same
SignatureValidationProperties
instance.
-
getContinueAfterFailure
Returns the Continue after failure setting for the provided context or the default context.- Parameters:
validationContext
- the context for which to retrieve the Continue after failure setting- Returns:
- the Continue after failure setting for the provided context or the default context
-
setContinueAfterFailure
public final SignatureValidationProperties setContinueAfterFailure(ValidatorContexts validatorContexts, CertificateSources certificateSources, boolean value) Sets the Continue after failure setting for the provided context.- Parameters:
validatorContexts
- the validators for which to set the Continue after failure settingcertificateSources
- the certificateSources for which to set the Continue after failure settingvalue
- the Continue after failure setting- Returns:
- this same
SignatureValidationProperties
instance.
-
getRevocationOnlineFetching
public SignatureValidationProperties.OnlineFetching getRevocationOnlineFetching(ValidationContext validationContext) Sets the onlineFetching property representing possible online fetching permissions.- Parameters:
validationContext
- the context for which to retrieve the online fetching setting- Returns:
- the online fetching setting.
-
setRevocationOnlineFetching
public final SignatureValidationProperties setRevocationOnlineFetching(ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, SignatureValidationProperties.OnlineFetching onlineFetching) Sets the onlineFetching property representing possible online fetching permissions.- Parameters:
validatorContexts
- the validators for which to set this valuecertificateSources
- the certificate source for which to set this valuetimeBasedContexts
- time perspective context, at which validation is happeningonlineFetching
- onlineFetching property value to set- Returns:
- this same
SignatureValidationProperties
instance.
-
getRequiredExtensions
Returns required extension for the provided validation context.- Parameters:
validationContext
- the validation context for which to retrieve required extensions- Returns:
- required extensions for the provided validation context
-
setRequiredExtensions
final SignatureValidationProperties setRequiredExtensions(CertificateSources certificateSources, List<CertificateExtension> requiredExtensions) -
setParameterValueFor
final void setParameterValueFor(EnumSet<ValidatorContext> validatorContexts, EnumSet<CertificateSource> certificateSources, EnumSet<TimeBasedContext> timeBasedContexts, Consumer<SignatureValidationProperties.ContextProperties> setter) This method executes the setter method for every combination of selected validators and certificateSources- Parameters:
validatorContexts
- the validators to execute the setter oncertificateSources
- the certificate sources to execute the setter onsetter
- the setter to execute
-
getParametersValueFor
<T> T getParametersValueFor(ValidatorContext validatorContext, CertificateSource certSource, TimeBasedContext timeBasedContext, Function<SignatureValidationProperties.ContextProperties, T> getter) This method executes the getter method to the most granular parameters set down until the getter returns a non-null value- Type Parameters:
T
- the type of the return value of this method and the getter method- Parameters:
validatorContext
- the validator for which the value is to be retrievedcertSource
- the certificate source for which the value is to be retrievedgetter
- the getter to get the value from the parameters set- Returns:
- the first non-null value returned.
-