Package com.itextpdf.kernel.validation
Class ValidationContainer
java.lang.Object
com.itextpdf.kernel.validation.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.booleanisPdfObjectChecked(PdfObject pdfObject) IsPdfObjectready to flush according to all addedIValidationCheckerimplementations.voidvalidate(IValidationContext context) Validate the providedIValidationContextwith all theIValidationCheckerimplementations.
-
Constructor Details
-
ValidationContainer
public ValidationContainer()Create a newValidationContainerinstance.By default, no
IValidationCheckerimplementations are added.
-
-
Method Details
-
validate
Validate the providedIValidationContextwith all theIValidationCheckerimplementations.- Parameters:
-
context- theIValidationContextto validate
-
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
-
isPdfObjectChecked
IsPdfObjectready to flush according to all addedIValidationCheckerimplementations.- Parameters:
-
pdfObject- the pdf object to check - Returns:
-
trueif the object is ready to flush,falseotherwise
-