Class DocumentRevisionsValidator
java.lang.Object
com.itextpdf.signatures.validation.v1.DocumentRevisionsValidator
Validator, which is responsible for document revisions validation according to doc-MDP and field-MDP rules.
-
Constructor Summary
ModifierConstructorDescriptionprotected
DocumentRevisionsValidator
(ValidatorChainBuilder chainBuilder) Creates new instance ofDocumentRevisionsValidator
. -
Method Summary
Modifier and TypeMethodDescriptionsetAccessPermissions
(AccessPermissions accessPermissions) Set access permissions to be used during docMDP validation.setEventCountingMetaInfo
(IMetaInfo metaInfo) Sets theIMetaInfo
that will be used during newPdfDocument
creations.Set the status to be used for the report items produced during docMDP validation in case revision contains unexpected changes in the XREF table.validateAllDocumentRevisions
(ValidationContext context, PdfDocument document) Validate all document revisions according to docMDP and fieldMDP transform methods.
-
Constructor Details
-
DocumentRevisionsValidator
Creates new instance ofDocumentRevisionsValidator
.- Parameters:
-
chainBuilder
- SeeValidatorChainBuilder
-
-
Method Details
-
setEventCountingMetaInfo
Sets theIMetaInfo
that will be used during newPdfDocument
creations.- Parameters:
-
metaInfo
- meta info to set - Returns:
-
the same
DocumentRevisionsValidator
instance.
-
setAccessPermissions
Set access permissions to be used during docMDP validation. If value is provided, access permission related signature parameters will be ignored during the validation.- Parameters:
-
accessPermissions
-AccessPermissions
docMDP validation level - Returns:
-
the same
DocumentRevisionsValidator
instance.
-
setUnexpectedXrefChangesStatus
public DocumentRevisionsValidator setUnexpectedXrefChangesStatus(ReportItem.ReportItemStatus status) Set the status to be used for the report items produced during docMDP validation in case revision contains unexpected changes in the XREF table. Default value isReportItem.ReportItemStatus.INFO
.- Parameters:
-
status
-ReportItem.ReportItemStatus
to be used in case of unexpected changes in the XREF table - Returns:
-
the same
DocumentRevisionsValidator
instance.
-
validateAllDocumentRevisions
public ValidationReport validateAllDocumentRevisions(ValidationContext context, PdfDocument document) Validate all document revisions according to docMDP and fieldMDP transform methods.- Parameters:
-
context
- the validation context in which to validate document revisions -
document
- the document to be validated - Returns:
-
ValidationReport
which contains detailed validation results.
-