Package com.itextpdf.kernel.validation
Class ValidationContainer
- java.lang.Object
-
- com.itextpdf.kernel.validation.ValidationContainer
-
public class ValidationContainer extends java.lang.Object
This class is a container for one or moreIValidationChecker
implementations.It is used in the
PdfDocument
to 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 newValidationContainer
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChecker(IValidationChecker checker)
Add anIValidationChecker
implementation to the container.boolean
containsChecker(IValidationChecker checker)
Check if the container contains the providedIValidationChecker
implementation.boolean
isPdfObjectChecked(PdfObject pdfObject)
IsPdfObject
ready to flush according to all addedIValidationChecker
implementations.void
validate(IValidationContext context)
Validate the providedIValidationContext
with all theIValidationChecker
implementations.
-
-
-
Field Detail
-
validationCheckers
private final java.util.List<IValidationChecker> validationCheckers
-
-
Constructor Detail
-
ValidationContainer
public ValidationContainer()
Create a newValidationContainer
instance.By default, no
IValidationChecker
implementations are added.
-
-
Method Detail
-
validate
public void validate(IValidationContext context)
Validate the providedIValidationContext
with all theIValidationChecker
implementations.- Parameters:
context
- theIValidationContext
to validate
-
addChecker
public void addChecker(IValidationChecker checker)
Add anIValidationChecker
implementation to the container.- Parameters:
checker
- theIValidationChecker
implementation to add
-
containsChecker
public boolean containsChecker(IValidationChecker checker)
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
-
isPdfObjectChecked
public boolean isPdfObjectChecked(PdfObject pdfObject)
IsPdfObject
ready to flush according to all addedIValidationChecker
implementations.- Parameters:
pdfObject
- the pdf object to check- Returns:
true
if the object is ready to flush,false
otherwise
-
-