Class AbstractASiCContainerValidator
java.lang.Object
eu.europa.esig.dss.validation.SignedDocumentValidator
eu.europa.esig.dss.asic.common.validation.AbstractASiCContainerValidator
- All Implemented Interfaces:
DocumentValidator
,ProcessExecutorProvider<DocumentProcessExecutor>
- Direct Known Subclasses:
ASiCContainerWithCAdESValidator
,ASiCContainerWithXAdESValidator
The abstract class for an ASiC container validation
-
Field Summary
Modifier and TypeFieldDescriptionprotected ASiCContent
The container extraction resultprotected List<DocumentValidator>
List of signature document validatorsprotected List<DetachedTimestampValidator>
List of timestamp document validatorsFields inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator
certificateVerifier, containerContents, detachedContents, document, manifestFile, processExecutor, signatureScopeFinder, signingCertificateSource, skipValidationContextExecution
-
Constructor Summary
ModifierConstructorDescriptionprotected
Empty constructorprotected
AbstractASiCContainerValidator
(ASiCContent asicContent) The constructor withASiCContent
protected
AbstractASiCContainerValidator
(ASiCContent asicContent, SignatureScopeFinder<?> signatureScopeFinder) Constructor with aASiCContent
protected
AbstractASiCContainerValidator
(DSSDocument document) The default constructorprotected
AbstractASiCContainerValidator
(DSSDocument document, SignatureScopeFinder<?> signatureScopeFinder) Constructor with a customSignatureScopeFinder
-
Method Summary
Modifier and TypeMethodDescriptionprotected List<TimestampToken>
attachExternalTimestamps
(List<AdvancedSignature> allSignatures) Attaches existing external timestamps to the list ofAdvancedSignature
sprotected List<AdvancedSignature>
This method build a list of signatures to be extracted from a documentprotected DiagnosticDataBuilder
createDiagnosticDataBuilder
(ValidationContext validationContext, List<AdvancedSignature> signatures) Creates and fills theDiagnosticDataBuilder
with a relevant dataReturns 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 AbstractASiCContainerExtractor
Returns the relevant container extractorprotected ContainerInfo
This method allows to retrieve the container information (ASiC Container)Returns a container typeReturns a list of embedded signature manifest documentsReturns a list of parser Manifest filesprotected abstract List<ManifestFile>
Returns a list of parser ManifestFilesReturns a mimetype documentReturns a list of embedded signature documentsprotected abstract List<DocumentValidator>
Returns a list of validators for signature documents embedded into the containerReturns 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 ASiCContainerDiagnosticDataBuilder
Initializes a relevantDiagnosticDataBuilder
for the given implementationabstract boolean
isSupported
(ASiCContent asicContent) Checks if theASiCContent
is supported by the current validatorMethods inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator
addReference, appendCounterSignatures, assertConfigurationValid, buildDetachedTimestamps, findSignatureScopes, findTimestampScopes, fromDocument, getDefaultDigestAlgorithm, getDefaultProcessExecutor, getDetachedTimestamps, getDiagnosticData, getOriginalDocuments, getSignatureById, getSignaturePolicyProvider, getSignaturePolicyValidatorLoader, getSignatures, getTimestampedReferences, getTimestampScopeFinder, getTokenIdentifierProvider, getValidationData, getValidationData, getValidationTime, instantiateValidationDataContainer, isSupported, prepareDetachedTimestampValidationContext, prepareDiagnosticDataBuilder, prepareSignatureForVerification, prepareSignatureScopeFinder, prepareSignatureValidationContext, prepareTimestampScopeFinder, prepareValidationContext, processSignaturesValidation, processValidationPolicy, provideProcessExecutorInstance, setCertificateVerifier, setContainerContents, setDetachedContents, setEnableEtsiValidationReport, setIncludeSemantics, setLocale, setManifestFile, setProcessExecutor, setSignaturePolicyProvider, setSigningCertificateSource, setSkipValidationContextExecution, setTokenExtractionStrategy, setTokenIdentifierProvider, setValidationLevel, setValidationTime, validateContext, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument
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.validation.DocumentValidator
getOriginalDocuments
-
Field Details
-
asicContent
The container extraction result -
signatureValidators
List of signature document validators -
timestampValidators
List of timestamp document validators
-
-
Constructor Details
-
AbstractASiCContainerValidator
protected AbstractASiCContainerValidator()Empty constructor -
AbstractASiCContainerValidator
The default constructor- Parameters:
document
-DSSDocument
to be validated
-
AbstractASiCContainerValidator
The constructor withASiCContent
- Parameters:
asicContent
-ASiCContent
to be validated
-
AbstractASiCContainerValidator
protected AbstractASiCContainerValidator(DSSDocument document, SignatureScopeFinder<?> signatureScopeFinder) Constructor with a customSignatureScopeFinder
- Parameters:
document
-DSSDocument
to be validatedsignatureScopeFinder
-SignatureScopeFinder
to be used
-
AbstractASiCContainerValidator
protected AbstractASiCContainerValidator(ASiCContent asicContent, SignatureScopeFinder<?> signatureScopeFinder) Constructor with aASiCContent
- Parameters:
asicContent
-ASiCContent
to be validatedsignatureScopeFinder
-SignatureScopeFinder
to be used
-
-
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:
AbstractASiCContainerExtractor
-
createDiagnosticDataBuilder
protected DiagnosticDataBuilder createDiagnosticDataBuilder(ValidationContext validationContext, List<AdvancedSignature> signatures) Description copied from class:SignedDocumentValidator
Creates and fills theDiagnosticDataBuilder
with a relevant data- Overrides:
createDiagnosticDataBuilder
in classSignedDocumentValidator
- Parameters:
validationContext
-ValidationContext
used for the validationsignatures
- a list ofAdvancedSignature
s to be validated collection- Returns:
- filled
DiagnosticDataBuilder
-
initializeDiagnosticDataBuilder
Description copied from class:SignedDocumentValidator
Initializes a relevantDiagnosticDataBuilder
for the given implementation- Overrides:
initializeDiagnosticDataBuilder
in classSignedDocumentValidator
- Returns:
SignedDocumentDiagnosticDataBuilder
-
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:SignedDocumentValidator
Returns a list of all signatures from the validating document- Overrides:
getAllSignatures
in classSignedDocumentValidator
- Returns:
- a list of
AdvancedSignature
s
-
buildSignatures
Description copied from class:SignedDocumentValidator
This method build a list of signatures to be extracted from a document- Overrides:
buildSignatures
in classSignedDocumentValidator
- Returns:
- a list of
AdvancedSignature
s
-
getSignatureValidators
Returns a list of validators for signature documents embedded into the container- Returns:
- a list of
DocumentValidator
s
-
getContainerType
Returns a container type- Returns:
ASiCContainerType
-
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
-
getArchiveManifestDocuments
Returns a list of embedded archive manifest documents- Returns:
- a list of archive 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
Returns a mimetype document- Returns:
DSSDocument
mimetype
-
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
-