Package eu.europa.esig.dss.validation
Class SignedDocumentDiagnosticDataBuilder
java.lang.Object
eu.europa.esig.dss.validation.DiagnosticDataBuilder
eu.europa.esig.dss.validation.SignedDocumentDiagnosticDataBuilder
- Direct Known Subclasses:
ASiCContainerDiagnosticDataBuilder
,CAdESDiagnosticDataBuilder
public class SignedDocumentDiagnosticDataBuilder extends DiagnosticDataBuilder
The common class for DiagnosticData creation from a signed/timestamped document
-
Field Summary
Fields Modifier and Type Field Description protected ListRevocationSource<CRL>
commonCRLSource
The list of all CRL revocation sourcesprotected ListRevocationSource<OCSP>
commonOCSPSource
The list of all OCSP revocation sourcesprotected SignaturePolicyProvider
signaturePolicyProvider
The signature policy providerprotected List<AdvancedSignature>
signatures
The list of signaturesprotected DSSDocument
signedDocument
The signed documentprotected Set<TimestampToken>
usedTimestamps
The list of timestamp tokensprotected Map<String,XmlSignature>
xmlSignaturesMap
The cached map of signaturesprotected Map<String,XmlSignerData>
xmlSignedDataMap
The cached map of original signed dataprotected Map<String,XmlTimestamp>
xmlTimestampsMap
The cached map of timestampsFields inherited from class eu.europa.esig.dss.validation.DiagnosticDataBuilder
certificateIdsMap, certificateSourceTypes, defaultDigestAlgorithm, referenceMap, signingCertificateMap, tokenExtractionStrategy, trustedCertSources, usedCertificates, usedRevocations, validationDate, xmlCertsMap, xmlOrphanCertificateTokensMap, xmlOrphanRevocationTokensMap, xmlRevocationsMap, xmlTrustedListsMap
-
Constructor Summary
Constructors Constructor Description SignedDocumentDiagnosticDataBuilder()
-
Method Summary
Methods inherited from class eu.europa.esig.dss.validation.DiagnosticDataBuilder
buildDetachedXmlCertificate, buildDetachedXmlRevocation, getUsedCertificateByCertificateRef, getXmlBasicSignature, getXmlCertificateRef, getXmlCRLRevocationRef, getXmlDigestAlgoAndValue, getXmlDigestAlgoAndValue, getXmlForCertificateChain, getXmlForCertificateChain, getXmlFoundCertificates, getXmlOCSPRevocationRef, getXmlRelatedCertificate, getXmlRelatedCertificate, getXmlRelatedCertificateForOrphanReferences, getXmlRevocationRefs, getXmlSignerInfo, getXmlSigningCertificate, populateCertificateOriginMap, verifyAgainstCertificateToken
-
Field Details
-
signedDocument
The signed document -
signatures
The list of signatures -
usedTimestamps
The list of timestamp tokens -
signaturePolicyProvider
The signature policy provider -
commonCRLSource
The list of all CRL revocation sources -
commonOCSPSource
The list of all OCSP revocation sources -
xmlSignaturesMap
The cached map of signatures -
xmlTimestampsMap
The cached map of timestamps -
xmlSignedDataMap
The cached map of original signed data
-
-
Constructor Details
-
SignedDocumentDiagnosticDataBuilder
public SignedDocumentDiagnosticDataBuilder()
-
-
Method Details
-
usedCertificates
public SignedDocumentDiagnosticDataBuilder usedCertificates(Set<CertificateToken> usedCertificates)Description copied from class:DiagnosticDataBuilder
This method allows to set the used certificates- Overrides:
usedCertificates
in classDiagnosticDataBuilder
- Parameters:
usedCertificates
- the used certificates- Returns:
- the builder
-
certificateSourceTypes
public SignedDocumentDiagnosticDataBuilder certificateSourceTypes(Map<CertificateToken,Set<CertificateSourceType>> certificateSourceTypes)Description copied from class:DiagnosticDataBuilder
This method allows to set the certificate source types- Overrides:
certificateSourceTypes
in classDiagnosticDataBuilder
- Parameters:
certificateSourceTypes
- the certificate source types- Returns:
- the builder
-
usedRevocations
public SignedDocumentDiagnosticDataBuilder usedRevocations(Set<RevocationToken<Revocation>> usedRevocations)Description copied from class:DiagnosticDataBuilder
This method allows to set the used revocation data- Overrides:
usedRevocations
in classDiagnosticDataBuilder
- Parameters:
usedRevocations
- the used revocation data- Returns:
- the builder
-
trustedCertificateSources
public SignedDocumentDiagnosticDataBuilder trustedCertificateSources(ListCertificateSource trustedCertSources)Description copied from class:DiagnosticDataBuilder
This method allows to set the TrustedListsCertificateSources- Overrides:
trustedCertificateSources
in classDiagnosticDataBuilder
- Parameters:
trustedCertSources
- the list of trusted lists certificate sources- Returns:
- the builder
-
validationDate
Description copied from class:DiagnosticDataBuilder
This method allows to set the validation date- Overrides:
validationDate
in classDiagnosticDataBuilder
- Parameters:
validationDate
- the validation date- Returns:
- the builder
-
tokenExtractionStrategy
public SignedDocumentDiagnosticDataBuilder tokenExtractionStrategy(TokenExtractionStrategy tokenExtractionStrategy)Description copied from class:DiagnosticDataBuilder
This method allows to set theTokenExtractionStrategy
to follow for the token extraction- Overrides:
tokenExtractionStrategy
in classDiagnosticDataBuilder
- Parameters:
tokenExtractionStrategy
-TokenExtractionStrategy
to use- Returns:
- the builder
-
defaultDigestAlgorithm
Description copied from class:DiagnosticDataBuilder
This method allows to set the defaultDigestAlgorithm
which will be used for tokens' DigestAlgoAndValue calculation- Overrides:
defaultDigestAlgorithm
in classDiagnosticDataBuilder
- Parameters:
digestAlgorithm
-DigestAlgorithm
to set as default- Returns:
- the builder
-
document
This method allows to set the document which is analysed- Parameters:
signedDocument
- the document which is analysed- Returns:
- the builder
-
foundSignatures
This method allows to set the found signatures- Parameters:
signatures
- the found signatures- Returns:
- the builder
-
usedTimestamps
This method allows to set the timestamps- Parameters:
usedTimestamps
- a set of validatedTimestampToken
s- Returns:
- the builder
-
signaturePolicyProvider
public SignedDocumentDiagnosticDataBuilder signaturePolicyProvider(SignaturePolicyProvider signaturePolicyProvider)This method allows to set theSignaturePolicyProvider
- Parameters:
signaturePolicyProvider
-SignaturePolicyProvider
- Returns:
- the builder
-
completeCRLSource
public SignedDocumentDiagnosticDataBuilder completeCRLSource(ListRevocationSource<CRL> completeCRLSource)Sets a merged CRL Source- Parameters:
completeCRLSource
-ListRevocationSource
computed from existing sources- Returns:
- the builder
-
completeOCSPSource
public SignedDocumentDiagnosticDataBuilder completeOCSPSource(ListRevocationSource<OCSP> completeOCSPSource)Sets a merged OCSP Source- Parameters:
completeOCSPSource
-ListRevocationSource
computed from existing sources- Returns:
- the builder
-
build
BuildsXmlDiagnosticData
- Overrides:
build
in classDiagnosticDataBuilder
- Returns:
XmlDiagnosticData
-
buildXmlSignerData
-
buildDetachedXmlSignature
BuildsXmlSignature
- Parameters:
signature
-AdvancedSignature
- Returns:
XmlSignature
-
emptyToNull
-
createOrphanTokenFromRevocationIdentifier
protected <R extends Revocation> XmlOrphanRevocationToken createOrphanTokenFromRevocationIdentifier(EncapsulatedRevocationTokenIdentifier<R> revocationIdentifier) -
buildDetachedXmlTimestamp
-
getXmlSignerInformationStore
protected List<XmlSignerInfo> getXmlSignerInformationStore(Set<CertificateIdentifier> certificateIdentifiers) -
buildXmlOrphanTokens
-