Class DetachedTimestampValidator
java.lang.Object
eu.europa.esig.dss.validation.SignedDocumentValidator
eu.europa.esig.dss.validation.timestamp.DetachedTimestampValidator
- All Implemented Interfaces:
DocumentValidator
,ProcessExecutorProvider<DocumentProcessExecutor>
- Direct Known Subclasses:
ASiCEWithCAdESTimestampValidator
public class DetachedTimestampValidator extends SignedDocumentValidator
Detached CMS TimestampToken Validator
-
Field Summary
Fields Modifier and Type Field Description protected TimestampToken
timestampToken
The TimestampToken to be validatedprotected TimestampType
timestampType
The type of the timestampFields inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator
certificateVerifier, containerContents, detachedContents, document, manifestFile, processExecutor, signatureScopeFinder, signingCertificateSource, skipValidationContextExecution
-
Constructor Summary
Constructors Constructor Description DetachedTimestampValidator(DSSDocument timestampFile)
The default constructorDetachedTimestampValidator(DSSDocument timestampFile, TimestampType timestampType)
The default constructor with a type -
Method Summary
Modifier and Type Method Description protected void
assertConfigurationValid()
Checks if the Validator configuration is validList<TimestampToken>
getDetachedTimestamps()
Retrieves the detached timestamps found in the documentList<DSSDocument>
getOriginalDocuments(AdvancedSignature advancedSignature)
This method returns the signed document(s) without their signature(s)List<DSSDocument>
getOriginalDocuments(String signatureId)
This method returns the signed document(s) without their signature(s)TimestampToken
getTimestamp()
Returns a single TimestampToken to be validatedDSSDocument
getTimestampedData()
Returns the timestamped dataprotected List<SignatureScope>
getTimestampSignatureScopes()
Returns a list of timestamp signature scopes (timestamped data)boolean
isSupported(DSSDocument dssDocument)
Checks if the document is supported by the current validatorvoid
setTimestampedData(DSSDocument document)
Sets the data that has been timestampedvoid
setValidationLevel(ValidationLevel validationLevel)
This method allows to specify the validation level (Basic / Timestamp / Long Term / Archival).Methods inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator
appendCounterSignatures, createDiagnosticDataBuilder, defineSigningCertificate, findSignatureScopes, fromDocument, getAllSignatures, getDefaultDigestAlgorithm, getDefaultProcessExecutor, getSignaturePolicyProvider, getSignatures, getValidationTime, initializeDiagnosticDataBuilder, mergeCertificateSource, mergeCRLSources, mergeOCSPSources, prepareCertificatesAndTimestamps, prepareCertificateVerifier, prepareDetachedTimestampValidationContext, prepareDiagnosticDataBuilder, prepareSignatureValidationContext, processSignaturesValidation, processValidationPolicy, provideProcessExecutorInstance, setCertificateVerifier, setContainerContents, setDetachedContents, setEnableEtsiValidationReport, setIncludeSemantics, setLocale, setManifestFile, setProcessExecutor, setSignaturePolicyProvider, setSignedScopeFinderDefaultDigestAlgorithm, setSigningCertificateSource, setSkipValidationContextExecution, setTokenExtractionStrategy, setValidationTime, validateContext, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument
-
Field Details
-
timestampType
The type of the timestamp -
timestampToken
The TimestampToken to be validated
-
-
Constructor Details
-
DetachedTimestampValidator
The default constructor- Parameters:
timestampFile
-DSSDocument
timestamp document to validate
-
DetachedTimestampValidator
The default constructor with a type- Parameters:
timestampFile
-DSSDocument
timestamp document to validatetimestampType
-TimestampType
-
-
Method Details
-
isSupported
Description copied from class:SignedDocumentValidator
Checks if the document is supported by the current validator- Specified by:
isSupported
in classSignedDocumentValidator
- Parameters:
dssDocument
-DSSDocument
to check- Returns:
- TRUE if the document is supported, FALSE otherwise
-
assertConfigurationValid
protected void assertConfigurationValid()Description copied from class:SignedDocumentValidator
Checks if the Validator configuration is valid- Overrides:
assertConfigurationValid
in classSignedDocumentValidator
-
getDetachedTimestamps
Description copied from interface:DocumentValidator
Retrieves the detached timestamps found in the document- Specified by:
getDetachedTimestamps
in interfaceDocumentValidator
- Overrides:
getDetachedTimestamps
in classSignedDocumentValidator
- Returns:
- a list of TimestampToken for validation purposes
-
getTimestamp
Returns a single TimestampToken to be validated- Returns:
TimestampToken
-
setValidationLevel
Description copied from interface:DocumentValidator
This method allows to specify the validation level (Basic / Timestamp / Long Term / Archival). By default, the selected validation is ARCHIVAL- Specified by:
setValidationLevel
in interfaceDocumentValidator
- Overrides:
setValidationLevel
in classSignedDocumentValidator
- Parameters:
validationLevel
-ValidationLevel
-
setTimestampedData
Sets the data that has been timestamped- Parameters:
document
-DSSDocument
timestamped data
-
getTimestampedData
Returns the timestamped data- Returns:
DSSDocument
timestamped data
-
getTimestampSignatureScopes
Returns a list of timestamp signature scopes (timestamped data)- Returns:
- a list of
SignatureScope
s
-
getOriginalDocuments
Description copied from interface:DocumentValidator
This method returns the signed document(s) without their signature(s)- Parameters:
signatureId
- the DSS ID of the signature to extract original signer data for- Returns:
- list of
DSSDocument
s
-
getOriginalDocuments
Description copied from interface:DocumentValidator
This method returns the signed document(s) without their signature(s)- Parameters:
advancedSignature
-AdvancedSignature
to find signer documents for- Returns:
- list of
DSSDocument
s
-