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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChecker(IValidationChecker checker) Add anIValidationCheckerimplementation to the container.booleancontainsChecker(IValidationChecker checker) Check if the container contains the providedIValidationCheckerimplementation.voidvalidate(ValidationContext context) Validate the providedValidationContextwith all theIValidationCheckerimplementations.voidCheck the provided object for conformance with all theIValidationCheckerimplementations.
-
Constructor Details
-
ValidationContainer
public ValidationContainer()Create a newValidationContainerinstance.By default, no
IValidationCheckerimplementations are added.
-
-
Method Details
-
validate
Validate the providedValidationContextwith all theIValidationCheckerimplementations.- Parameters:
-
context- theValidationContextto validate
-
validate
public void validate(Object obj, IsoKey key, PdfResources resources, PdfStream contentStream, Object extra) Check the provided object for conformance with all theIValidationCheckerimplementations.- Parameters:
-
obj- the object to check -
key- theIsoKeyof the object -
resources- thePdfResourcesof the object -
contentStream- thePdfStreamof the object -
extra- additional information
-
addChecker
Add anIValidationCheckerimplementation to the container.- Parameters:
-
checker- theIValidationCheckerimplementation to add
-
containsChecker
Check if the container contains the providedIValidationCheckerimplementation.- Parameters:
-
checker- theIValidationCheckerimplementation to check - Returns:
-
trueif the container contains the providedIValidationCheckerimplementation,falseotherwise
-