Class AbstractTrustedListWithSha2Predicate

java.lang.Object
eu.europa.esig.dss.tsl.sha2.AbstractTrustedListWithSha2Predicate
All Implemented Interfaces:
Predicate<DocumentWithSha2>
Direct Known Subclasses:
DefaultTrustedListWithSha2Predicate

public abstract class AbstractTrustedListWithSha2Predicate extends Object implements Predicate<DocumentWithSha2>
This is an abstract implementation of a Predicate for a Trusted List document with sha2 processing, containing common utility methods for a Trusted List validation
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
    The path to reach a tl:NextUpdate element
    protected static final eu.europa.esig.dss.enumerations.DigestAlgorithm
    The default sha2 digest algorithm defined in ETSI TS 119 612
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Date
    getNextUpdate(eu.europa.esig.dss.model.DSSDocument tlDocument)
    This method retrieves a NextUpdate date value from the provided Trusted List document
    protected eu.europa.esig.dss.model.Digest
    getOriginalDocumentDigest(eu.europa.esig.dss.model.DSSDocument document)
    This method computes Digest on the given DSSDocument's content
    protected eu.europa.esig.dss.model.Digest
    getSha2Digest(eu.europa.esig.dss.model.DSSDocument sha2Document)
    This method parses the sha2Document and returns the Digest

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.function.Predicate

    and, negate, or, test
  • Field Details

    • SHA2_ALGORITHM

      protected static final eu.europa.esig.dss.enumerations.DigestAlgorithm SHA2_ALGORITHM
      The default sha2 digest algorithm defined in ETSI TS 119 612
    • NEXT_UPDATE_PATH

      protected static final String NEXT_UPDATE_PATH
      The path to reach a tl:NextUpdate element
      See Also:
  • Constructor Details

    • AbstractTrustedListWithSha2Predicate

      protected AbstractTrustedListWithSha2Predicate()
      Default constructor
  • Method Details

    • getOriginalDocumentDigest

      protected eu.europa.esig.dss.model.Digest getOriginalDocumentDigest(eu.europa.esig.dss.model.DSSDocument document)
      This method computes Digest on the given DSSDocument's content
      Parameters:
      document - DSSDocument to compute digest on
      Returns:
      Digest
    • getSha2Digest

      protected eu.europa.esig.dss.model.Digest getSha2Digest(eu.europa.esig.dss.model.DSSDocument sha2Document)
      This method parses the sha2Document and returns the Digest
      Parameters:
      sha2Document - DSSDocument representing a sha2 document
      Returns:
      Digest
    • getNextUpdate

      protected Date getNextUpdate(eu.europa.esig.dss.model.DSSDocument tlDocument)
      This method retrieves a NextUpdate date value from the provided Trusted List document
      Parameters:
      tlDocument - DSSDocument representing a cached Trusted List
      Returns:
      Date NextUpdate (when defined)