Class ASiCContentDocumentFilter

java.lang.Object
eu.europa.esig.dss.asic.common.evidencerecord.ASiCContentDocumentFilter

public class ASiCContentDocumentFilter extends Object
This class provides a configuration to filter the content of an ASiC container. Example: the class can be used to define type of documents to be protected by an evidence record (see eu.europa.esig.dss.asic.common.evidencerecord.ASiCEvidenceRecordDigestBuilder) See eu.europa.esig.dss.asic.common.evidencerecord.ASiCContentDocumentFilterFactory class for creating of pre-configured instances for basic usages
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor instantiating an ASiCContentDocumentFilter object with an empty configuration
  • Method Summary

    Modifier and Type
    Method
    Description
    List<eu.europa.esig.dss.model.DSSDocument>
    filter(ASiCContent asicContent)
    Returns a list of filtered DSSDocuments according to the configuration
    void
    setArchiveManifestDocuments(boolean archiveManifestDocuments)
    Sets whether the archive ASiC manifest documents present within a META-INF/ folder shall be returned
    void
    setEvidenceRecordDocuments(boolean evidenceRecordDocuments)
    Sets whether the evidence record documents present within a META-INF/ folder shall be returned
    void
    setEvidenceRecordManifestDocuments(boolean evidenceRecordManifestDocuments)
    Sets whether the evidence record manifest documents present within a META-INF/ folder shall be returned
    void
    Sets a collection of document filenames to be excluded from the final return result
    void
    Sets a collection of document filenames to be included in the final return result despite other settings.
    void
    setManifestDocuments(boolean manifestDocuments)
    Sets whether the ASiC manifest documents present within a META-INF/ folder shall be returned
    void
    setMimetypeDocument(boolean mimetypeDocument)
    Sets whether the mimetype document present at the root level shall be returned
    void
    setSignatureDocuments(boolean signatureDocuments)
    Sets whether the signature documents present within a META-INF/ folder shall be returned
    void
    setSignedDocuments(boolean signedDocuments)
    Sets whether the original signed documents shall be returned
    void
    setTimestampDocuments(boolean timestampDocuments)
    Sets whether the time-stamp documents present within a META-INF/ folder shall be returned
    void
    setUnsupportedDocuments(boolean unsupportedDocuments)
    Sets whether other documents not directly supported by EN 319 162-1 specification shall be returned

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ASiCContentDocumentFilter

      public ASiCContentDocumentFilter()
      Default constructor instantiating an ASiCContentDocumentFilter object with an empty configuration
  • Method Details

    • setMimetypeDocument

      public void setMimetypeDocument(boolean mimetypeDocument)
      Sets whether the mimetype document present at the root level shall be returned
      Parameters:
      mimetypeDocument - whether the mimetype document present at the root level shall be returned
    • setSignedDocuments

      public void setSignedDocuments(boolean signedDocuments)
      Sets whether the original signed documents shall be returned
      Parameters:
      signedDocuments - whether the original signed documents present at the root level shall be returned
    • setSignatureDocuments

      public void setSignatureDocuments(boolean signatureDocuments)
      Sets whether the signature documents present within a META-INF/ folder shall be returned
      Parameters:
      signatureDocuments - whether the signature documents present within a META-INF/ folder shall be returned
    • setTimestampDocuments

      public void setTimestampDocuments(boolean timestampDocuments)
      Sets whether the time-stamp documents present within a META-INF/ folder shall be returned
      Parameters:
      timestampDocuments - whether the time-stamp documents present within a META-INF/ folder shall be returned
    • setEvidenceRecordDocuments

      public void setEvidenceRecordDocuments(boolean evidenceRecordDocuments)
      Sets whether the evidence record documents present within a META-INF/ folder shall be returned
      Parameters:
      evidenceRecordDocuments - whether the evidence record documents present within a META-INF/ folder shall be returned
    • setManifestDocuments

      public void setManifestDocuments(boolean manifestDocuments)
      Sets whether the ASiC manifest documents present within a META-INF/ folder shall be returned
      Parameters:
      manifestDocuments - whether the ASiC manifest documents present within a META-INF/ folder shall be returned
    • setArchiveManifestDocuments

      public void setArchiveManifestDocuments(boolean archiveManifestDocuments)
      Sets whether the archive ASiC manifest documents present within a META-INF/ folder shall be returned
      Parameters:
      archiveManifestDocuments - whether the archive ASiC manifest documents present within a META-INF/ folder shall be returned
    • setEvidenceRecordManifestDocuments

      public void setEvidenceRecordManifestDocuments(boolean evidenceRecordManifestDocuments)
      Sets whether the evidence record manifest documents present within a META-INF/ folder shall be returned
      Parameters:
      evidenceRecordManifestDocuments - whether the evidence record manifest documents present within a META-INF/ folder shall be returned
    • setUnsupportedDocuments

      public void setUnsupportedDocuments(boolean unsupportedDocuments)
      Sets whether other documents not directly supported by EN 319 162-1 specification shall be returned
      Parameters:
      unsupportedDocuments - whether other documents not directly supported by EN 319 162-1 specification shall be returned
    • setExcludedFilenames

      public void setExcludedFilenames(Collection<String> excludedFilenames)
      Sets a collection of document filenames to be excluded from the final return result
      Parameters:
      excludedFilenames - a collection of String document filenames to be excluded
    • setIncludedFilenames

      public void setIncludedFilenames(Collection<String> includedFilenames)
      Sets a collection of document filenames to be included in the final return result despite other settings. NOTE: take precedence over all other constraints.
      Parameters:
      includedFilenames - a collection of String document filenames to be included
    • filter

      public List<eu.europa.esig.dss.model.DSSDocument> filter(ASiCContent asicContent)
      Returns a list of filtered DSSDocuments according to the configuration
      Parameters:
      asicContent - ASiCContent representing the ASiC container to get documents from
      Returns:
      a list of DSSDocuments