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 TimestampTokentimestampTokenThe TimestampToken to be validatedprotected TimestampTypetimestampTypeThe 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 voidassertConfigurationValid()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)TimestampTokengetTimestamp()Returns a single TimestampToken to be validatedDSSDocumentgetTimestampedData()Returns the timestamped dataprotected List<SignatureScope>getTimestampSignatureScopes()Returns a list of timestamp signature scopes (timestamped data)booleanisSupported(DSSDocument dssDocument)Checks if the document is supported by the current validatorvoidsetTimestampedData(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
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-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
-
getDetachedTimestamps
Description copied from interface:DocumentValidatorRetrieves the detached timestamps found in the document- Specified by:
getDetachedTimestampsin interfaceDocumentValidator- Overrides:
getDetachedTimestampsin classSignedDocumentValidator- Returns:
- a list of TimestampToken for validation purposes
-
getTimestamp
Returns a single TimestampToken to be validated- 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
Returns the timestamped data- Returns:
DSSDocumenttimestamped data
-
getTimestampSignatureScopes
Returns a list of timestamp signature scopes (timestamped data)- Returns:
- a list of
SignatureScopes
-
getOriginalDocuments
Description copied from interface:DocumentValidatorThis 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
DSSDocuments
-
getOriginalDocuments
Description copied from interface:DocumentValidatorThis method returns the signed document(s) without their signature(s)- Parameters:
advancedSignature-AdvancedSignatureto find signer documents for- Returns:
- list of
DSSDocuments
-