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
FieldsModifier and TypeFieldDescriptionprotected TimestampTokenThe TimestampToken to be validatedprotected TimestampTypeThe type of the timestampFields inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator
certificateVerifier, containerContents, detachedContents, document, manifestFile, processExecutor, signatureScopeFinder, signingCertificateSource, skipValidationContextExecution -
Constructor Summary
ConstructorsConstructorDescriptionDetachedTimestampValidator(DSSDocument timestampFile) The default constructorDetachedTimestampValidator(DSSDocument timestampFile, TimestampType timestampType) The default constructor with a type -
Method Summary
Modifier and TypeMethodDescriptionprotected voidChecks if the Validator configuration is validprotected List<TimestampToken>Builds a list of detachedTimestampTokens extracted from the documentprotected TimestampTokenThis 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 DetachedTimestampScopeFinderThis method returns a timestamp scope finderbooleanisSupported(DSSDocument dssDocument) Checks if the document is supported by the current validatorprotected voidprepareDetachedTimestampScopeFinder(DetachedTimestampScopeFinder timestampScopeFinder) This method is used to prepare aDetachedTimestampScopeFinderfor executionvoidsetTimestampedData(DSSDocument document) Sets the data that has been timestampedvoidsetValidationLevel(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-DSSDocumenttimestamp document to validate
-
DetachedTimestampValidator
The default constructor with a type- Parameters:
timestampFile-DSSDocumenttimestamp document to validatetimestampType-TimestampType
-
-
Method Details
-
isSupported
Description copied from class:SignedDocumentValidatorChecks if the document is supported by the current validator- Specified by:
isSupportedin classSignedDocumentValidator- Parameters:
dssDocument-DSSDocumentto check- Returns:
- TRUE if the document is supported, FALSE otherwise
-
assertConfigurationValid
protected void assertConfigurationValid()Description copied from class:SignedDocumentValidatorChecks if the Validator configuration is valid- Overrides:
assertConfigurationValidin classSignedDocumentValidator
-
buildDetachedTimestamps
Description copied from class:SignedDocumentValidatorBuilds a list of detachedTimestampTokens extracted from the document- Overrides:
buildDetachedTimestampsin classSignedDocumentValidator- Returns:
- a list of
TimestampTokens
-
getTimestamp
Description copied from interface:TimestampValidatorReturns a single TimestampToken to be validated- Specified by:
getTimestampin interfaceTimestampValidator- Returns:
TimestampToken
-
createTimestampToken
This method creates a timestamp token from the validating document- Returns:
TimestampToken
-
setValidationLevel
Description copied from interface:DocumentValidatorThis method allows to specify the validation level (Basic / Timestamp / Long Term / Archival). By default, the selected validation is ARCHIVAL- Specified by:
setValidationLevelin interfaceDocumentValidator- Overrides:
setValidationLevelin classSignedDocumentValidator- Parameters:
validationLevel-ValidationLevel
-
setTimestampedData
Sets the data that has been timestamped- Parameters:
document-DSSDocumenttimestamped data
-
getTimestampedData
Description copied from interface:TimestampValidatorReturns the timestamped data- Specified by:
getTimestampedDatain interfaceTimestampValidator- Returns:
DSSDocumenttimestamped data
-
getTimestampScopeFinder
Description copied from class:SignedDocumentValidatorThis method returns a timestamp scope finder- Overrides:
getTimestampScopeFinderin classSignedDocumentValidator- Returns:
TimestampScopeFinder
-
prepareDetachedTimestampScopeFinder
protected void prepareDetachedTimestampScopeFinder(DetachedTimestampScopeFinder timestampScopeFinder) This method is used to prepare aDetachedTimestampScopeFinderfor execution- Parameters:
timestampScopeFinder-DetachedTimestampScopeFinder
-
getOriginalDocuments
Description copied from interface:DocumentValidatorThis method returns the signed document(s) without their signature(s)- Specified by:
getOriginalDocumentsin interfaceDocumentValidator- Overrides:
getOriginalDocumentsin classSignedDocumentValidator- Parameters:
signatureId- the DSS ID of the signature to extract original signer data for- Returns:
- list of
DSSDocuments
-
getOriginalDocuments
Description copied from interface:DocumentValidatorThis method returns the signed document(s) without their signature(s)- Specified by:
getOriginalDocumentsin interfaceDocumentValidator- Parameters:
advancedSignature-AdvancedSignatureto find signer documents for- Returns:
- list of
DSSDocuments
-