Package eu.europa.esig.dss.validation
Class DiagnosticDataBuilder
- java.lang.Object
-
- eu.europa.esig.dss.validation.DiagnosticDataBuilder
-
public class DiagnosticDataBuilder extends Object
This class is used to build JAXB objects from the DSS model
-
-
Constructor Summary
Constructors Constructor Description DiagnosticDataBuilder()
-
Method Summary
Modifier and Type Method Description XmlDiagnosticDatabuild()DiagnosticDataBuildercertificateSourceTypes(Map<CertificateToken,Set<CertificateSourceType>> certificateSourceTypes)This method allows to set the certificate source typesDiagnosticDataBuildercontainerInfo(ContainerInfo containerInfo)This method allows to set the container info (ASiC)DiagnosticDataBuilderdocument(DSSDocument signedDocument)This method allows to set the document which is analysedDiagnosticDataBuilderfoundSignatures(List<AdvancedSignature> signatures)This method allows to set the found signaturesDiagnosticDataBuilderincludeRawCertificateTokens(boolean includeRawCertificateTokens)This method allows set the behavior to include raw certificate tokens into the diagnostic report.DiagnosticDataBuilderincludeRawRevocationData(boolean includeRawRevocationData)This method allows set the behavior to include raw revocation data into the diagnostic report.DiagnosticDataBuilderincludeRawTimestampTokens(boolean includeRawTimestampTokens)This method allows set the behavior to include raw timestamp tokens into the diagnostic report.List<BigInteger>intArrayToBigIntegerList(int[] v)booleanisAtLeastOneFound(List<ReferenceValidation> referenceValidations)Checks if at least one Manifest entry was foundDiagnosticDataBuildersetDefaultDigestAlgorithm(DigestAlgorithm digestAlgorithm)This method allows to set the defaultDigestAlgorithmwhich will be used for tokens' DigestAlgoAndValue calculationDiagnosticDataBuildertrustedCertificateSource(CertificateSource trustedCertSource)This method allows to set the TrustedListsCertificateSourceDiagnosticDataBuilderusedCertificates(Set<CertificateToken> usedCertificates)This method allows to set the used certificatesDiagnosticDataBuilderusedRevocations(Set<RevocationToken> usedRevocations)This method allows to set the used revocation dataDiagnosticDataBuildervalidationDate(Date validationDate)This method allows to set the validation date
-
-
-
Method Detail
-
document
public DiagnosticDataBuilder document(DSSDocument signedDocument)
This method allows to set the document which is analysed- Parameters:
signedDocument- the document which is analysed- Returns:
- the builder
-
containerInfo
public DiagnosticDataBuilder containerInfo(ContainerInfo containerInfo)
This method allows to set the container info (ASiC)- Parameters:
containerInfo- the container information- Returns:
- the builder
-
foundSignatures
public DiagnosticDataBuilder foundSignatures(List<AdvancedSignature> signatures)
This method allows to set the found signatures- Parameters:
signatures- the found signatures- Returns:
- the builder
-
usedCertificates
public DiagnosticDataBuilder usedCertificates(Set<CertificateToken> usedCertificates)
This method allows to set the used certificates- Parameters:
usedCertificates- the used certificates- Returns:
- the builder
-
certificateSourceTypes
public DiagnosticDataBuilder certificateSourceTypes(Map<CertificateToken,Set<CertificateSourceType>> certificateSourceTypes)
This method allows to set the certificate source types- Parameters:
certificateSourceTypes- the certificate source types- Returns:
- the builder
-
usedRevocations
public DiagnosticDataBuilder usedRevocations(Set<RevocationToken> usedRevocations)
This method allows to set the used revocation data- Parameters:
usedRevocations- the used revocation data- Returns:
- the builder
-
includeRawCertificateTokens
public DiagnosticDataBuilder includeRawCertificateTokens(boolean includeRawCertificateTokens)
This method allows set the behavior to include raw certificate tokens into the diagnostic report. (default: false)- Parameters:
includeRawCertificateTokens- true if the certificate tokens need to be exported in the diagnostic data- Returns:
- the builder
-
includeRawRevocationData
public DiagnosticDataBuilder includeRawRevocationData(boolean includeRawRevocationData)
This method allows set the behavior to include raw revocation data into the diagnostic report. (default: false)- Parameters:
includeRawRevocationData- true if the revocation data need to be exported in the diagnostic data- Returns:
- the builder
-
includeRawTimestampTokens
public DiagnosticDataBuilder includeRawTimestampTokens(boolean includeRawTimestampTokens)
This method allows set the behavior to include raw timestamp tokens into the diagnostic report. (default: false)- Parameters:
includeRawTimestampTokens- true if the timestamp tokens need to be exported in the diagnostic data- Returns:
- the builder
-
setDefaultDigestAlgorithm
public DiagnosticDataBuilder setDefaultDigestAlgorithm(DigestAlgorithm digestAlgorithm)
This method allows to set the defaultDigestAlgorithmwhich will be used for tokens' DigestAlgoAndValue calculation- Parameters:
digestAlgorithm-DigestAlgorithmto set as default- Returns:
- the builder
-
trustedCertificateSource
public DiagnosticDataBuilder trustedCertificateSource(CertificateSource trustedCertSource)
This method allows to set the TrustedListsCertificateSource- Parameters:
trustedCertSource- the trusted lists certificate source- Returns:
- the builder
-
validationDate
public DiagnosticDataBuilder validationDate(Date validationDate)
This method allows to set the validation date- Parameters:
validationDate- the validation date- Returns:
- the builder
-
build
public XmlDiagnosticData build()
-
intArrayToBigIntegerList
public List<BigInteger> intArrayToBigIntegerList(int[] v)
-
isAtLeastOneFound
public boolean isAtLeastOneFound(List<ReferenceValidation> referenceValidations)
Checks if at least one Manifest entry was found- Returns:
- TRUE if at least one ManifestEntry was found, FALSE otherwise
-
-