Class AbstractASiCContainerAnalyzer
java.lang.Object
eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
eu.europa.esig.dss.asic.common.validation.AbstractASiCContainerAnalyzer
- All Implemented Interfaces:
DocumentAnalyzer
- Direct Known Subclasses:
ASiCContainerWithCAdESAnalyzer,ASiCContainerWithXAdESAnalyzer
The abstract class for an ASiC container validation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ASiCContentThe container extraction resultprotected List<EvidenceRecordAnalyzer> List of evidence record document validatorsprotected List<DocumentAnalyzer> List of signature document analyzersprotected List<TimestampAnalyzer> List of timestamp document validatorsFields inherited from class eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
certificateVerifier, containerContents, detachedContents, detachedEvidenceRecordDocuments, document, manifestFile, signingCertificateSource -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEmpty constructorprotectedAbstractASiCContainerAnalyzer(ASiCContent asicContent) The constructor withASiCContentprotectedAbstractASiCContainerAnalyzer(DSSDocument document) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddReference(SignatureScope signatureScope) Checks if the signature scope shall be added as a timestamped reference NOTE: used to avoid duplicates in ASiC with CAdES validator, due to covered signature/timestamp filesprotected voidassertEvidenceRecordDocumentExtensionMatch(DSSDocument evidenceRecordDocument, EvidenceRecordTypeEnum evidenceRecordTypeEnum) This method verifies whether the extension ofevidenceRecordDocumentis conformant to the applicable standard for the givenevidenceRecordTypeEnumprotected voidattachExternalEvidenceRecords(List<EvidenceRecord> embeddedEvidenceRecords, List<EvidenceRecord> detachedEvidenceRecords) Appends detached evidence record provided to the validator to the evidence records covered by the corresponding evidence recordsprotected List<TimestampToken> attachExternalTimestamps(List<AdvancedSignature> allSignatures) Attaches existing external timestamps to the list ofAdvancedSignaturesprotected List<EvidenceRecord> Builds a list of detachedEvidenceRecords extracted from the documentprotected List<AdvancedSignature> This method build a list of signatures to be extracted from a documentprotected booleancoversSignature(AdvancedSignature signature, EvidenceRecord evidenceRecord) Verifies whether anevidenceRecordcovers thesignatureReturns a list of all embedded documentsReturns a list of all embedded manifest documentsReturns a list of all signatures from the validating documentReturns a list of archive documents embedded the containerReturns a list of embedded archive manifest documentsprotected abstract DefaultASiCContainerExtractorReturns the relevant container extractorprotected ContainerInfoThis method allows to retrieve the container information (ASiC Container)Returns a container typeprotected List<EvidenceRecordAnalyzer> Builds and returns a list of evidence record analyzersReturns a list of embedded evidence record documentsReturns a list of embedded evidence record manifest documentsReturns a list of embedded signature manifest documentsReturns a list of parser Manifest filesprotected abstract List<ManifestFile> Returns a list of parser ManifestFilesReturns a mimetype documentprotected abstract List<DocumentAnalyzer> Returns a list of validators for signature documents embedded into the containerReturns a list of embedded signature documentsReturns a list of embedded signed documentsprotected List<DSSDocument> getSignedDocumentsASiCS(List<DSSDocument> retrievedDocs) Returns a list of "package.zip" documentsReturns a list of embedded timestamp documentsReturns a list of unsupported documents from the containerprotected ManifestFilegetValidatedManifestFile(DSSDocument manifest) Returns a validatedManifestFilefor the givenmanifestdocumentabstract booleanisSupported(ASiCContent asicContent) Checks if theASiCContentis supported by the current validatorMethods inherited from class eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
appendCounterSignatures, appendExternalEvidenceRecords, appendExternalEvidenceRecords, buildDetachedTimestamps, buildEvidenceRecord, createValidationContext, fromDocument, getAllEvidenceRecords, getDetachedEvidenceRecords, getDetachedTimestamps, getDocument, getEvidenceRecord, getEvidenceRecordScopes, getOriginalDocuments, getSignatureById, getSignaturePolicyProvider, getSignaturePolicyValidatorLoader, getSignatures, getTimestampedReferences, getTimestampReaders, getTokenIdentifierProvider, getValidationData, getValidationData, getValidationTime, instantiateValidationDataContainer, isTimestampCoveredByEvidenceRecord, prepareDetachedEvidenceRecordValidationContext, prepareDetachedTimestampValidationContext, prepareSignatureForVerification, prepareSignatureValidationContext, prepareValidationContext, processSignaturesValidation, setCertificateVerifier, setContainerContents, setDetachedContents, setDetachedEvidenceRecordDocuments, setDetachedEvidenceRecords, setManifestFile, setSignaturePolicyProvider, setSigningCertificateSource, setTokenIdentifierProvider, setValidationContextExecutor, setValidationTime, validate, validateContext, validateSignaturePolicyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.europa.esig.dss.spi.validation.analyzer.DocumentAnalyzer
getOriginalDocuments, isSupported
-
Field Details
-
asicContent
The container extraction result -
signatureValidators
List of signature document analyzers -
timestampAnalyzers
List of timestamp document validators -
evidenceRecordAnalyzers
List of evidence record document validators
-
-
Constructor Details
-
AbstractASiCContainerAnalyzer
protected AbstractASiCContainerAnalyzer()Empty constructor -
AbstractASiCContainerAnalyzer
The default constructor- Parameters:
document-DSSDocumentto be validated
-
AbstractASiCContainerAnalyzer
The constructor withASiCContent- Parameters:
asicContent-ASiCContentto be validated
-
-
Method Details
-
isSupported
Checks if theASiCContentis supported by the current validator- Parameters:
asicContent-ASiCContentto check- Returns:
- TRUE if the ASiC Content is supported, FALSE otherwise
-
getContainerExtractor
Returns the relevant container extractor- Returns:
DefaultASiCContainerExtractor
-
getContainerInfo
This method allows to retrieve the container information (ASiC Container)- Returns:
- a DTO with the container information
-
attachExternalTimestamps
Attaches existing external timestamps to the list ofAdvancedSignatures- Parameters:
allSignatures- list ofAdvancedSignatures- Returns:
- list of attached
TimestampTokens
-
getManifestFilesDescriptions
Returns a list of parser ManifestFiles- Returns:
- a list of
ManifestFiles
-
getAllSignatures
Description copied from class:DefaultDocumentAnalyzerReturns a list of all signatures from the validating document- Overrides:
getAllSignaturesin classDefaultDocumentAnalyzer- Returns:
- a list of
AdvancedSignatures
-
buildSignatures
Description copied from class:DefaultDocumentAnalyzerThis method build a list of signatures to be extracted from a document- Overrides:
buildSignaturesin classDefaultDocumentAnalyzer- Returns:
- a list of
AdvancedSignatures
-
getSignatureAnalyzers
Returns a list of validators for signature documents embedded into the container- Returns:
- a list of
DocumentValidators
-
getContainerType
-
getAllDocuments
Returns a list of all embedded documents- Returns:
- a list of all embedded
DSSDocuments
-
getSignatureDocuments
Returns a list of embedded signature documents- Returns:
- a list of signature
DSSDocuments
-
getSignedDocuments
Returns a list of embedded signed documents- Returns:
- a list of signed
DSSDocuments
-
getManifestDocuments
Returns a list of embedded signature manifest documents- Returns:
- a list of signature manifest
DSSDocuments
-
getTimestampDocuments
Returns a list of embedded timestamp documents- Returns:
- a list of timestamp
DSSDocuments
-
getEvidenceRecordDocuments
Returns a list of embedded evidence record documents- Returns:
- a list of evidence record
DSSDocuments
-
getArchiveManifestDocuments
Returns a list of embedded archive manifest documents- Returns:
- a list of archive manifest
DSSDocuments
-
getEvidenceRecordManifestDocuments
Returns a list of embedded evidence record manifest documents- Returns:
- a list of evidence record manifest
DSSDocuments
-
getAllManifestDocuments
Returns a list of all embedded manifest documents- Returns:
- a list of manifest
DSSDocuments
-
getArchiveDocuments
Returns a list of archive documents embedded the container- Returns:
- a list of archive
DSSDocuments
-
getMimeTypeDocument
-
getUnsupportedDocuments
Returns a list of unsupported documents from the container- Returns:
- a list of unsupported documents
DSSDocuments
-
getManifestFiles
Returns a list of parser Manifest files- Returns:
- a list of
ManifestFiles
-
getSignedDocumentsASiCS
Returns a list of "package.zip" documents- Parameters:
retrievedDocs- the retrieved signed documents- Returns:
- a list of
DSSDocuments
-
buildDetachedEvidenceRecords
Description copied from class:DefaultDocumentAnalyzerBuilds a list of detachedEvidenceRecords extracted from the document- Overrides:
buildDetachedEvidenceRecordsin classDefaultDocumentAnalyzer- Returns:
- a list of
EvidenceRecords
-
attachExternalEvidenceRecords
protected void attachExternalEvidenceRecords(List<EvidenceRecord> embeddedEvidenceRecords, List<EvidenceRecord> detachedEvidenceRecords) Appends detached evidence record provided to the validator to the evidence records covered by the corresponding evidence records- Parameters:
embeddedEvidenceRecords- a list ofEvidenceRecords extracted from the ASiC containerdetachedEvidenceRecords- a list ofEvidenceRecords provided externally to the validation
-
getEvidenceRecordAnalyzers
Builds and returns a list of evidence record analyzers- Returns:
- a list of
EvidenceRecordAnalyzer
-
assertEvidenceRecordDocumentExtensionMatch
protected void assertEvidenceRecordDocumentExtensionMatch(DSSDocument evidenceRecordDocument, EvidenceRecordTypeEnum evidenceRecordTypeEnum) This method verifies whether the extension ofevidenceRecordDocumentis conformant to the applicable standard for the givenevidenceRecordTypeEnum- Parameters:
evidenceRecordDocument-DSSDocumentto be validatedevidenceRecordTypeEnum-EvidenceRecordTypeEnumidentified for the document
-
coversSignature
Description copied from class:DefaultDocumentAnalyzerVerifies whether anevidenceRecordcovers thesignature- Overrides:
coversSignaturein classDefaultDocumentAnalyzer- Parameters:
signature-AdvancedSignatureevidenceRecord-EvidenceRecord- Returns:
- TRUE if the evidence record covers the signature file, FALSE otherwise
-
getValidatedManifestFile
Returns a validatedManifestFilefor the givenmanifestdocument- Parameters:
manifest-DSSDocument- Returns:
ManifestFile
-
addReference
Description copied from class:DefaultDocumentAnalyzerChecks if the signature scope shall be added as a timestamped reference NOTE: used to avoid duplicates in ASiC with CAdES validator, due to covered signature/timestamp files- Overrides:
addReferencein classDefaultDocumentAnalyzer- Parameters:
signatureScope-SignatureScopeto check- Returns:
- TRUE if the timestamped reference shall be created for the given
SignatureScope, FALSE otherwise
-