Class DefaultASiCContainerExtractor

java.lang.Object
eu.europa.esig.dss.asic.common.extract.DefaultASiCContainerExtractor
All Implemented Interfaces:
ASiCContainerExtractor
Direct Known Subclasses:
ASiCWithCAdESContainerExtractor, ASiCWithXAdESContainerExtractor

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

    • asicContainer

      protected final DSSDocument asicContainer
      Represents an ASiC container
  • Constructor Details

    • DefaultASiCContainerExtractor

      protected DefaultASiCContainerExtractor(DSSDocument asicContainer)
      The default constructor
      Parameters:
      asicContainer - DSSDocument representing an ASiC container to extract entries from
  • Method Details

    • fromDocument

      public static ASiCContainerExtractor fromDocument(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