Class DetachedTimestampValidator
java.lang.Object
eu.europa.esig.dss.validation.SignedDocumentValidator
eu.europa.esig.dss.validation.timestamp.DetachedTimestampValidator
- All Implemented Interfaces:
DocumentValidator
,ProcessExecutorProvider<DocumentProcessExecutor>
,TimestampValidator
- Direct Known Subclasses:
ASiCWithCAdESTimestampValidator
public class DetachedTimestampValidator
extends SignedDocumentValidator
implements TimestampValidator
Detached CMS TimestampToken Validator
-
Field Summary
Modifier and TypeFieldDescriptionprotected TimestampToken
The TimestampToken to be validatedprotected 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
ConstructorDescriptionDetachedTimestampValidator
(DSSDocument timestampFile) The default constructorDetachedTimestampValidator
(DSSDocument timestampFile, TimestampType timestampType) The default constructor with a type -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Checks if the Validator configuration is validprotected List<TimestampToken>
Builds a list of detachedTimestampToken
s extracted from the documentprotected TimestampToken
This method creates a timestamp token from the validating documentgetOriginalDocuments
(AdvancedSignature advancedSignature) This method returns the signed document(s) without their signature(s)getOriginalDocuments
(String signatureId) This method returns the signed document(s) without their signature(s)Returns a single TimestampToken to be validatedReturns the timestamped dataprotected DetachedTimestampScopeFinder
This method returns a timestamp scope finderboolean
isSupported
(DSSDocument dssDocument) Checks if the document is supported by the current validatorprotected void
prepareDetachedTimestampScopeFinder
(DetachedTimestampScopeFinder timestampScopeFinder) This method is used to prepare aDetachedTimestampScopeFinder
for executionvoid
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
addReference, appendCounterSignatures, buildSignatures, createDiagnosticDataBuilder, findSignatureScopes, findTimestampScopes, fromDocument, getAllSignatures, getDefaultDigestAlgorithm, getDefaultProcessExecutor, getDetachedTimestamps, getDiagnosticData, getSignatureById, getSignaturePolicyProvider, getSignaturePolicyValidatorLoader, getSignatures, getTimestampedReferences, getTokenIdentifierProvider, getValidationData, getValidationData, getValidationTime, initializeDiagnosticDataBuilder, instantiateValidationDataContainer, prepareDetachedTimestampValidationContext, prepareDiagnosticDataBuilder, prepareSignatureForVerification, prepareSignatureScopeFinder, prepareSignatureValidationContext, prepareTimestampScopeFinder, prepareValidationContext, processSignaturesValidation, processValidationPolicy, provideProcessExecutorInstance, setCertificateVerifier, setContainerContents, setDetachedContents, setEnableEtsiValidationReport, setIncludeSemantics, setLocale, setManifestFile, setProcessExecutor, setSignaturePolicyProvider, setSigningCertificateSource, setSkipValidationContextExecution, setTokenExtractionStrategy, setTokenIdentifierProvider, setValidationTime, validateContext, validateDocument, 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
-
buildDetachedTimestamps
Description copied from class:SignedDocumentValidator
Builds a list of detachedTimestampToken
s extracted from the document- Overrides:
buildDetachedTimestamps
in classSignedDocumentValidator
- Returns:
- a list of
TimestampToken
s
-
getTimestamp
Description copied from interface:TimestampValidator
Returns a single TimestampToken to be validated- Specified by:
getTimestamp
in interfaceTimestampValidator
- Returns:
TimestampToken
-
createTimestampToken
This method creates a timestamp token from the validating document- 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
Description copied from interface:TimestampValidator
Returns the timestamped data- Specified by:
getTimestampedData
in interfaceTimestampValidator
- Returns:
DSSDocument
timestamped data
-
getTimestampScopeFinder
Description copied from class:SignedDocumentValidator
This method returns a timestamp scope finder- Overrides:
getTimestampScopeFinder
in classSignedDocumentValidator
- Returns:
TimestampScopeFinder
-
prepareDetachedTimestampScopeFinder
protected void prepareDetachedTimestampScopeFinder(DetachedTimestampScopeFinder timestampScopeFinder) This method is used to prepare aDetachedTimestampScopeFinder
for execution- Parameters:
timestampScopeFinder
-DetachedTimestampScopeFinder
-
getOriginalDocuments
Description copied from interface:DocumentValidator
This method returns the signed document(s) without their signature(s)- Specified by:
getOriginalDocuments
in interfaceDocumentValidator
- Overrides:
getOriginalDocuments
in classSignedDocumentValidator
- 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)- Specified by:
getOriginalDocuments
in interfaceDocumentValidator
- Parameters:
advancedSignature
-AdvancedSignature
to find signer documents for- Returns:
- list of
DSSDocument
s
-