Package com.itextpdf.kernel.utils
Class ValidationContainer
- java.lang.Object
-
- com.itextpdf.kernel.utils.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.void
validate(ValidationContext context)
Validate the providedValidationContext
with all theIValidationChecker
implementations.void
validate(java.lang.Object obj, IsoKey key, PdfResources resources, PdfStream contentStream, java.lang.Object extra)
Check the provided object for conformance 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(ValidationContext context)
Validate the providedValidationContext
with all theIValidationChecker
implementations.- Parameters:
context
- theValidationContext
to validate
-
validate
public void validate(java.lang.Object obj, IsoKey key, PdfResources resources, PdfStream contentStream, java.lang.Object extra)
Check the provided object for conformance with all theIValidationChecker
implementations.- Parameters:
obj
- the object to checkkey
- theIsoKey
of the objectresources
- thePdfResources
of the objectcontentStream
- thePdfStream
of the objectextra
- additional information
-
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
-
-