Class DefaultASiCContainerExtractor

java.lang.Object
eu.europa.esig.dss.asic.common.extract.DefaultASiCContainerExtractor
All Implemented Interfaces:
ASiCContainerExtractor

public abstract class DefaultASiCContainerExtractor extends Object implements ASiCContainerExtractor
This class is used to read an ASiC Container and to retrieve its content files
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final eu.europa.esig.dss.model.DSSDocument
    Represents an ASiC container
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    DefaultASiCContainerExtractor(eu.europa.esig.dss.model.DSSDocument asicContainer)
    The default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    Extracts a content (documents) embedded into the asicContainer
    fromDocument(eu.europa.esig.dss.model.DSSDocument asicContainer)
    Loads an implementation of ASiCContainerExtractor corresponding to asicContainer type
    protected abstract boolean
    Checks if the given String file name represents an allowed archive manifest name for the current ASiC container format
    protected abstract boolean
    Checks if the given String file name represents an allowed evidence record document name for the current ASiC container format
    protected abstract boolean
    Checks if the given String file name represents an allowed evidence record manifest name for the current ASiC container format
    protected abstract boolean
    Checks if the given String file name represents an allowed manifest name for the current ASiC container format
    protected abstract boolean
    Checks if the given String file name represents an allowed signature document name for the current ASiC container format
    protected abstract boolean
    Checks if the given String file name represents an allowed timestamp document name for the current ASiC container format

    Methods inherited from class Object

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

    Methods inherited from interface ASiCContainerExtractor

    isSupportedContainerFormat
  • Field Details

    • asicContainer

      protected final eu.europa.esig.dss.model.DSSDocument asicContainer
      Represents an ASiC container
  • Constructor Details

    • DefaultASiCContainerExtractor

      protected DefaultASiCContainerExtractor(eu.europa.esig.dss.model.DSSDocument asicContainer)
      The default constructor
      Parameters:
      asicContainer - DSSDocument representing an ASiC container to extract entries from
  • Method Details

    • fromDocument

      public static ASiCContainerExtractor fromDocument(eu.europa.esig.dss.model.DSSDocument asicContainer)
      Loads an implementation of ASiCContainerExtractor corresponding to asicContainer type
      Parameters:
      asicContainer - DSSDocument representing an ASiC archive
      Returns:
      ASiCContainerExtractor
    • extract

      public ASiCContent extract()
      Description copied from interface: ASiCContainerExtractor
      Extracts a content (documents) embedded into the asicContainer
      Specified by:
      extract in interface ASiCContainerExtractor
      Returns:
      ASiCContent
    • isAllowedManifest

      protected abstract boolean isAllowedManifest(String entryName)
      Checks if the given String file name represents an allowed manifest name for the current ASiC container format
      Parameters:
      entryName - String document name to check
      Returns:
      TRUE if the name represents an allowed manifest document name, FALSE otherwise
    • isAllowedArchiveManifest

      protected abstract boolean isAllowedArchiveManifest(String entryName)
      Checks if the given String file name represents an allowed archive manifest name for the current ASiC container format
      Parameters:
      entryName - String document name to check
      Returns:
      TRUE if the name represents an allowed archive manifest document name, FALSE otherwise
    • isAllowedEvidenceRecordManifest

      protected abstract boolean isAllowedEvidenceRecordManifest(String entryName)
      Checks if the given String file name represents an allowed evidence record manifest name for the current ASiC container format
      Parameters:
      entryName - String document name to check
      Returns:
      TRUE if the name represents an allowed evidence record manifest document name, FALSE otherwise
    • isAllowedSignature

      protected abstract boolean isAllowedSignature(String entryName)
      Checks if the given String file name represents an allowed signature document name for the current ASiC container format
      Parameters:
      entryName - String document name to check
      Returns:
      TRUE if the name represents an allowed signature document name, FALSE otherwise
    • isAllowedTimestamp

      protected abstract boolean isAllowedTimestamp(String entryName)
      Checks if the given String file name represents an allowed timestamp document name for the current ASiC container format
      Parameters:
      entryName - String document name to check
      Returns:
      TRUE if the name represents an allowed timestamp document name, FALSE otherwise
    • isAllowedEvidenceRecord

      protected abstract boolean isAllowedEvidenceRecord(String entryName)
      Checks if the given String file name represents an allowed evidence record document name for the current ASiC container format
      Parameters:
      entryName - String document name to check
      Returns:
      TRUE if the name represents an allowed evidence record document name, FALSE otherwise