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
Modifier and TypeFieldDescriptionprotected ASiCContent
The 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
ModifierConstructorDescriptionprotected
Empty constructorprotected
AbstractASiCContainerAnalyzer
(ASiCContent asicContent) The constructor withASiCContent
protected
AbstractASiCContainerAnalyzer
(DSSDocument document) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
addReference
(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 void
assertEvidenceRecordDocumentExtensionMatch
(DSSDocument evidenceRecordDocument, EvidenceRecordTypeEnum evidenceRecordTypeEnum) This method verifies whether the extension ofevidenceRecordDocument
is conformant to the applicable standard for the givenevidenceRecordTypeEnum
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 recordsprotected List
<TimestampToken> attachExternalTimestamps
(List<AdvancedSignature> allSignatures) Attaches existing external timestamps to the list ofAdvancedSignature
sprotected List
<EvidenceRecord> Builds a list of detachedEvidenceRecord
s extracted from the documentprotected List
<AdvancedSignature> This method build a list of signatures to be extracted from a documentprotected boolean
coversSignature
(AdvancedSignature signature, EvidenceRecord evidenceRecord) Verifies whether anevidenceRecord
covers thesignature
Returns 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 DefaultASiCContainerExtractor
Returns the relevant container extractorprotected ContainerInfo
This 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 ManifestFile
getValidatedManifestFile
(DSSDocument manifest) Returns a validatedManifestFile
for the givenmanifest
documentabstract boolean
isSupported
(ASiCContent asicContent) Checks if theASiCContent
is 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, validateSignaturePolicy
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
-DSSDocument
to be validated
-
AbstractASiCContainerAnalyzer
The constructor withASiCContent
- Parameters:
asicContent
-ASiCContent
to be validated
-
-
Method Details
-
isSupported
Checks if theASiCContent
is supported by the current validator- Parameters:
asicContent
-ASiCContent
to 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 ofAdvancedSignature
s- Parameters:
allSignatures
- list ofAdvancedSignature
s- Returns:
- list of attached
TimestampToken
s
-
getManifestFilesDescriptions
Returns a list of parser ManifestFiles- Returns:
- a list of
ManifestFile
s
-
getAllSignatures
Description copied from class:DefaultDocumentAnalyzer
Returns a list of all signatures from the validating document- Overrides:
getAllSignatures
in classDefaultDocumentAnalyzer
- Returns:
- a list of
AdvancedSignature
s
-
buildSignatures
Description copied from class:DefaultDocumentAnalyzer
This method build a list of signatures to be extracted from a document- Overrides:
buildSignatures
in classDefaultDocumentAnalyzer
- Returns:
- a list of
AdvancedSignature
s
-
getSignatureAnalyzers
Returns a list of validators for signature documents embedded into the container- Returns:
- a list of
DocumentValidator
s
-
getContainerType
-
getAllDocuments
Returns a list of all embedded documents- Returns:
- a list of all embedded
DSSDocument
s
-
getSignatureDocuments
Returns a list of embedded signature documents- Returns:
- a list of signature
DSSDocument
s
-
getSignedDocuments
Returns a list of embedded signed documents- Returns:
- a list of signed
DSSDocument
s
-
getManifestDocuments
Returns a list of embedded signature manifest documents- Returns:
- a list of signature manifest
DSSDocument
s
-
getTimestampDocuments
Returns a list of embedded timestamp documents- Returns:
- a list of timestamp
DSSDocument
s
-
getEvidenceRecordDocuments
Returns a list of embedded evidence record documents- Returns:
- a list of evidence record
DSSDocument
s
-
getArchiveManifestDocuments
Returns a list of embedded archive manifest documents- Returns:
- a list of archive manifest
DSSDocument
s
-
getEvidenceRecordManifestDocuments
Returns a list of embedded evidence record manifest documents- Returns:
- a list of evidence record manifest
DSSDocument
s
-
getAllManifestDocuments
Returns a list of all embedded manifest documents- Returns:
- a list of manifest
DSSDocument
s
-
getArchiveDocuments
Returns a list of archive documents embedded the container- Returns:
- a list of archive
DSSDocument
s
-
getMimeTypeDocument
-
getUnsupportedDocuments
Returns a list of unsupported documents from the container- Returns:
- a list of unsupported documents
DSSDocument
s
-
getManifestFiles
Returns a list of parser Manifest files- Returns:
- a list of
ManifestFile
s
-
getSignedDocumentsASiCS
Returns a list of "package.zip" documents- Parameters:
retrievedDocs
- the retrieved signed documents- Returns:
- a list of
DSSDocument
s
-
buildDetachedEvidenceRecords
Description copied from class:DefaultDocumentAnalyzer
Builds a list of detachedEvidenceRecord
s extracted from the document- Overrides:
buildDetachedEvidenceRecords
in classDefaultDocumentAnalyzer
- Returns:
- a list of
EvidenceRecord
s
-
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 ofEvidenceRecord
s extracted from the ASiC containerdetachedEvidenceRecords
- a list ofEvidenceRecord
s 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 ofevidenceRecordDocument
is conformant to the applicable standard for the givenevidenceRecordTypeEnum
- Parameters:
evidenceRecordDocument
-DSSDocument
to be validatedevidenceRecordTypeEnum
-EvidenceRecordTypeEnum
identified for the document
-
coversSignature
Description copied from class:DefaultDocumentAnalyzer
Verifies whether anevidenceRecord
covers thesignature
- Overrides:
coversSignature
in classDefaultDocumentAnalyzer
- Parameters:
signature
-AdvancedSignature
evidenceRecord
-EvidenceRecord
- Returns:
- TRUE if the evidence record covers the signature file, FALSE otherwise
-
getValidatedManifestFile
Returns a validatedManifestFile
for the givenmanifest
document- Parameters:
manifest
-DSSDocument
- Returns:
ManifestFile
-
addReference
Description copied from class:DefaultDocumentAnalyzer
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 files- Overrides:
addReference
in classDefaultDocumentAnalyzer
- Parameters:
signatureScope
-SignatureScope
to check- Returns:
- TRUE if the timestamped reference shall be created for the given
SignatureScope
, FALSE otherwise
-