Package com.itextpdf.kernel.validation
Class ValidationContainer
- java.lang.Object
-
- com.itextpdf.kernel.validation.ValidationContainer
-
public class ValidationContainer extends java.lang.ObjectThis class is a container for one or moreIValidationCheckerimplementations.It is used in the
PdfDocumentto check for additional conformance requirements.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<IValidationChecker>validationCheckers
-
Constructor Summary
Constructors Constructor Description ValidationContainer()Create a newValidationContainerinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChecker(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.
-
-
-
Field Detail
-
validationCheckers
private final java.util.List<IValidationChecker> validationCheckers
-
-
Constructor Detail
-
ValidationContainer
public ValidationContainer()
Create a newValidationContainerinstance.By default, no
IValidationCheckerimplementations are added.
-
-
Method Detail
-
validate
public void validate(IValidationContext context)
Validate the providedIValidationContextwith all theIValidationCheckerimplementations.- Parameters:
context- theIValidationContextto validate
-
addChecker
public void addChecker(IValidationChecker checker)
Add anIValidationCheckerimplementation to the container.- Parameters:
checker- theIValidationCheckerimplementation to add
-
containsChecker
public boolean containsChecker(IValidationChecker checker)
Check if the container contains the providedIValidationCheckerimplementation.- Parameters:
checker- theIValidationCheckerimplementation to check- Returns:
trueif the container contains the providedIValidationCheckerimplementation,falseotherwise
-
isPdfObjectChecked
public boolean isPdfObjectChecked(PdfObject pdfObject)
IsPdfObjectready to flush according to all addedIValidationCheckerimplementations.- Parameters:
pdfObject- the pdf object to check- Returns:
trueif the object is ready to flush,falseotherwise
-
-