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>commonCRLSourceThe list of all CRL revocation sourcesprotected ListRevocationSource<OCSP>commonOCSPSourceThe list of all OCSP revocation sourcesprotected SignaturePolicyProvidersignaturePolicyProviderThe signature policy providerprotected List<AdvancedSignature>signaturesThe list of signaturesprotected DSSDocumentsignedDocumentThe signed documentprotected Set<TimestampToken>usedTimestampsThe list of timestamp tokensprotected Map<String,XmlSignature>xmlSignaturesMapThe cached map of signaturesprotected Map<String,XmlSignerData>xmlSignedDataMapThe cached map of original signed dataprotected Map<String,XmlTimestamp>xmlTimestampsMapThe 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:DiagnosticDataBuilderThis method allows to set the used certificates- Overrides:
usedCertificatesin classDiagnosticDataBuilder- Parameters:
usedCertificates- the used certificates- Returns:
- the builder
-
certificateSourceTypes
public SignedDocumentDiagnosticDataBuilder certificateSourceTypes(Map<CertificateToken,Set<CertificateSourceType>> certificateSourceTypes)Description copied from class:DiagnosticDataBuilderThis method allows to set the certificate source types- Overrides:
certificateSourceTypesin classDiagnosticDataBuilder- Parameters:
certificateSourceTypes- the certificate source types- Returns:
- the builder
-
usedRevocations
public SignedDocumentDiagnosticDataBuilder usedRevocations(Set<RevocationToken<Revocation>> usedRevocations)Description copied from class:DiagnosticDataBuilderThis method allows to set the used revocation data- Overrides:
usedRevocationsin classDiagnosticDataBuilder- Parameters:
usedRevocations- the used revocation data- Returns:
- the builder
-
trustedCertificateSources
public SignedDocumentDiagnosticDataBuilder trustedCertificateSources(ListCertificateSource trustedCertSources)Description copied from class:DiagnosticDataBuilderThis method allows to set the TrustedListsCertificateSources- Overrides:
trustedCertificateSourcesin classDiagnosticDataBuilder- Parameters:
trustedCertSources- the list of trusted lists certificate sources- Returns:
- the builder
-
validationDate
Description copied from class:DiagnosticDataBuilderThis method allows to set the validation date- Overrides:
validationDatein classDiagnosticDataBuilder- Parameters:
validationDate- the validation date- Returns:
- the builder
-
tokenExtractionStrategy
public SignedDocumentDiagnosticDataBuilder tokenExtractionStrategy(TokenExtractionStrategy tokenExtractionStrategy)Description copied from class:DiagnosticDataBuilderThis method allows to set theTokenExtractionStrategyto follow for the token extraction- Overrides:
tokenExtractionStrategyin classDiagnosticDataBuilder- Parameters:
tokenExtractionStrategy-TokenExtractionStrategyto use- Returns:
- the builder
-
defaultDigestAlgorithm
Description copied from class:DiagnosticDataBuilderThis method allows to set the defaultDigestAlgorithmwhich will be used for tokens' DigestAlgoAndValue calculation- Overrides:
defaultDigestAlgorithmin classDiagnosticDataBuilder- Parameters:
digestAlgorithm-DigestAlgorithmto 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 validatedTimestampTokens- 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-ListRevocationSourcecomputed from existing sources- Returns:
- the builder
-
completeOCSPSource
public SignedDocumentDiagnosticDataBuilder completeOCSPSource(ListRevocationSource<OCSP> completeOCSPSource)Sets a merged OCSP Source- Parameters:
completeOCSPSource-ListRevocationSourcecomputed from existing sources- Returns:
- the builder
-
build
BuildsXmlDiagnosticData- Overrides:
buildin 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
-