Class ValidationReport
java.lang.Object
com.itextpdf.signatures.validation.report.ValidationReport
- All Implemented Interfaces:
-
IJsonSerializable
Validation report, which contains detailed validation results.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing possible validation results. -
Constructor Summary
ConstructorsConstructorDescriptionCreate new instance ofValidationReport.ValidationReport(ValidationReport report) Create a copy of another validation report. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReportItem(ReportItem item) Add new report item to the overall validation result.static ValidationReportDeserializesJsonValueintoValidationReport.Get list of failures, which are related to certificate validation.Get list of log messages, which are related to certificate validation.Get all failures recognized during a validation process.getLogs()Get all log messages reported during a validation process.Get the result of a validation process.merge(ValidationReport subReport) Merge allReportItemobjects from sub report into this one.mergeWithDifferentStatus(ValidationReport subReport, ReportItem.ReportItemStatus newStatus) Merge allReportItemobjects from sub report into this one with different status.toJson()Serializes object to JSON AST.toString().
-
Constructor Details
-
ValidationReport
public ValidationReport()Create new instance ofValidationReport. -
ValidationReport
Create a copy of another validation report.- Parameters:
-
report- to be copied
-
-
Method Details
-
getValidationResult
Get the result of a validation process.- Returns:
-
ValidationReport.ValidationResult, which represents the result of a validation
-
getFailures
Get all failures recognized during a validation process.- Returns:
-
report items
List, which contains all recognized failures
-
getCertificateFailures
Get list of failures, which are related to certificate validation.- Returns:
-
report items
List, which contains onlyCertificateReportItemfailures
-
getLogs
Get all log messages reported during a validation process.- Returns:
-
report items
List, which contains all reported log messages, related to validation
-
getCertificateLogs
Get list of log messages, which are related to certificate validation.- Returns:
-
report items
List, which contains onlyCertificateReportItemlog messages
-
addReportItem
Add new report item to the overall validation result.- Parameters:
-
item-ReportItemto be added
-
toString
. -
merge
Merge allReportItemobjects from sub report into this one.- Parameters:
-
subReport- report from which items will be merged - Returns:
-
ValidationReportthe same updated validation report instance.
-
toJson
Serializes object to JSON AST..- Specified by:
-
toJsonin interfaceIJsonSerializable - Returns:
-
JsonValueserialized object
-
fromJson
DeserializesJsonValueintoValidationReport.- Parameters:
-
jsonValue-JsonValueto deserialize - Returns:
-
deserialized
ValidationReport
-
mergeWithDifferentStatus
public ValidationReport mergeWithDifferentStatus(ValidationReport subReport, ReportItem.ReportItemStatus newStatus) Merge allReportItemobjects from sub report into this one with different status.- Parameters:
-
subReport- report from which items will be merged -
newStatus-ReportItem.ReportItemStatuswhich will be used instead of provided ones - Returns:
-
ValidationReportthe same updated validation report instance.
-