Package com.itextpdf.kernel.utils
Class ValidationContainer
java.lang.Object
com.itextpdf.kernel.utils.ValidationContainer
This class is a container for one or more
IValidationChecker
implementations.
It is used in the PdfDocument
to check for additional conformance requirements.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChecker
(IValidationChecker checker) Add anIValidationChecker
implementation to the container.boolean
containsChecker
(IValidationChecker checker) Check if the container contains the providedIValidationChecker
implementation.void
validate
(ValidationContext context) Validate the providedValidationContext
with all theIValidationChecker
implementations.void
Check the provided object for conformance with all theIValidationChecker
implementations.
-
Constructor Details
-
ValidationContainer
public ValidationContainer()Create a newValidationContainer
instance.By default, no
IValidationChecker
implementations are added.
-
-
Method Details
-
validate
Validate the providedValidationContext
with all theIValidationChecker
implementations.- Parameters:
-
context
- theValidationContext
to validate
-
validate
public void validate(Object obj, IsoKey key, PdfResources resources, PdfStream contentStream, Object extra) Check the provided object for conformance with all theIValidationChecker
implementations.- Parameters:
-
obj
- the object to check -
key
- theIsoKey
of the object -
resources
- thePdfResources
of the object -
contentStream
- thePdfStream
of the object -
extra
- additional information
-
addChecker
Add anIValidationChecker
implementation to the container.- Parameters:
-
checker
- theIValidationChecker
implementation to add
-
containsChecker
Check if the container contains the providedIValidationChecker
implementation.- Parameters:
-
checker
- theIValidationChecker
implementation to check - Returns:
-
true
if the container contains the providedIValidationChecker
implementation,false
otherwise
-