Class DetachedTimestampValidator

java.lang.Object
eu.europa.esig.dss.validation.SignedDocumentValidator
eu.europa.esig.dss.validation.timestamp.DetachedTimestampValidator
All Implemented Interfaces:
DocumentValidator, ProcessExecutorProvider<eu.europa.esig.dss.validation.executor.DocumentProcessExecutor>, TimestampValidator

public class DetachedTimestampValidator extends SignedDocumentValidator implements TimestampValidator
Detached CMS TimestampToken Validator
  • Field Details

    • timestampType

      protected eu.europa.esig.dss.enumerations.TimestampType timestampType
      The type of the timestamp
    • timestampToken

      protected eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken
      The TimestampToken to be validated
  • Constructor Details

    • DetachedTimestampValidator

      public DetachedTimestampValidator(eu.europa.esig.dss.model.DSSDocument timestampFile)
      The default constructor
      Parameters:
      timestampFile - DSSDocument timestamp document to validate
    • DetachedTimestampValidator

      public DetachedTimestampValidator(eu.europa.esig.dss.model.DSSDocument timestampFile, eu.europa.esig.dss.enumerations.TimestampType timestampType)
      The default constructor with a type
      Parameters:
      timestampFile - DSSDocument timestamp document to validate
      timestampType - TimestampType
  • Method Details

    • isSupported

      public boolean isSupported(eu.europa.esig.dss.model.DSSDocument dssDocument)
      Description copied from class: SignedDocumentValidator
      Checks if the document is supported by the current validator
      Specified by:
      isSupported in class SignedDocumentValidator
      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 class SignedDocumentValidator
    • buildDetachedTimestamps

      protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> buildDetachedTimestamps()
      Description copied from class: SignedDocumentValidator
      Builds a list of detached TimestampTokens extracted from the document
      Overrides:
      buildDetachedTimestamps in class SignedDocumentValidator
      Returns:
      a list of TimestampTokens
    • getTimestamp

      public eu.europa.esig.dss.spi.x509.tsp.TimestampToken getTimestamp()
      Description copied from interface: TimestampValidator
      Returns a single TimestampToken to be validated
      Specified by:
      getTimestamp in interface TimestampValidator
      Returns:
      TimestampToken
    • createTimestampToken

      protected eu.europa.esig.dss.spi.x509.tsp.TimestampToken createTimestampToken()
      This method creates a timestamp token from the validating document
      Returns:
      TimestampToken
    • setValidationLevel

      public void setValidationLevel(eu.europa.esig.dss.validation.executor.ValidationLevel validationLevel)
      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 interface DocumentValidator
      Overrides:
      setValidationLevel in class SignedDocumentValidator
      Parameters:
      validationLevel - ValidationLevel
    • setTimestampedData

      public void setTimestampedData(eu.europa.esig.dss.model.DSSDocument document)
      Sets the data that has been timestamped
      Parameters:
      document - DSSDocument timestamped data
    • getTimestampedData

      public eu.europa.esig.dss.model.DSSDocument getTimestampedData()
      Description copied from interface: TimestampValidator
      Returns the timestamped data
      Specified by:
      getTimestampedData in interface TimestampValidator
      Returns:
      DSSDocument timestamped data
    • getTimestampScopes

      protected List<eu.europa.esig.dss.model.scope.SignatureScope> getTimestampScopes(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken)
      Finds timestamp scopes
      Parameters:
      timestampToken - TimestampToken
      Returns:
      a list of SignatureScopes
    • getOriginalDocuments

      public List<eu.europa.esig.dss.model.DSSDocument> getOriginalDocuments(String signatureId)
      Description copied from interface: DocumentValidator
      This method returns the signed document(s) without their signature(s)
      Specified by:
      getOriginalDocuments in interface DocumentValidator
      Overrides:
      getOriginalDocuments in class SignedDocumentValidator
      Parameters:
      signatureId - the DSS ID of the signature to extract original signer data for
      Returns:
      list of DSSDocuments
    • getOriginalDocuments

      public List<eu.europa.esig.dss.model.DSSDocument> getOriginalDocuments(AdvancedSignature advancedSignature)
      Description copied from interface: DocumentValidator
      This method returns the signed document(s) without their signature(s)
      Specified by:
      getOriginalDocuments in interface DocumentValidator
      Parameters:
      advancedSignature - AdvancedSignature to find signer documents for
      Returns:
      list of DSSDocuments