Class RepositoryZipImporter

java.lang.Object
org.eclipse.dirigible.repository.zip.RepositoryZipImporter

public class RepositoryZipImporter
extends Object
Utility class which imports all the content from a given zip.
  • Constructor Summary

    Constructors 
    Constructor Description
    RepositoryZipImporter()  
  • Method Summary

    Modifier and Type Method Description
    static void importZip​(IRepository repository, ZipInputStream zipInputStream, String relativeRoot)
    Import all the content from a given zip to the target repository instance within the given path.
    static void importZip​(IRepository repository, ZipInputStream zipInputStream, String relativeRoot, boolean override)
    Import all the content from a given zip to the target repository instance within the given path, overrides files during the pass.
    static void importZip​(IRepository repository, ZipInputStream zipInputStream, String relativeRoot, boolean override, boolean excludeRootFolderName)
    Import all the content from a given zip to the target repository instance within the given path, overrides files during the pass and removes the root folder name.
    static void importZip​(IRepository repository, ZipInputStream zipInputStream, String relativeRoot, boolean override, boolean excludeRootFolderName, Map<String,​String> filter)
    Import all the content from a given zip to the target repository instance within the given path, overrides files during the pass and removes the root folder name.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • importZip

      public static void importZip​(IRepository repository, ZipInputStream zipInputStream, String relativeRoot) throws RepositoryImportException
      Import all the content from a given zip to the target repository instance within the given path.
      Parameters:
      repository - the target IRepository instance
      zipInputStream - the content input stream
      relativeRoot - the relative root
      Throws:
      RepositoryImportException - in case the content cannot be imported
    • importZip

      public static void importZip​(IRepository repository, ZipInputStream zipInputStream, String relativeRoot, boolean override) throws RepositoryImportException
      Import all the content from a given zip to the target repository instance within the given path, overrides files during the pass.
      Parameters:
      repository - the target IRepository instance
      zipInputStream - the content input stream
      relativeRoot - the relative root
      override - whether to override existing
      Throws:
      RepositoryImportException - in case the content cannot be imported
    • importZip

      public static void importZip​(IRepository repository, ZipInputStream zipInputStream, String relativeRoot, boolean override, boolean excludeRootFolderName) throws RepositoryImportException
      Import all the content from a given zip to the target repository instance within the given path, overrides files during the pass and removes the root folder name.
      Parameters:
      repository - the target IRepository instance
      zipInputStream - the content input stream
      relativeRoot - the relative root
      override - whether to override existing
      excludeRootFolderName - the exclude root folder name
      Throws:
      RepositoryImportException - in case the content cannot be imported
    • importZip

      public static void importZip​(IRepository repository, ZipInputStream zipInputStream, String relativeRoot, boolean override, boolean excludeRootFolderName, Map<String,​String> filter) throws RepositoryImportException
      Import all the content from a given zip to the target repository instance within the given path, overrides files during the pass and removes the root folder name.
      Parameters:
      repository - the target IRepository instance
      zipInputStream - the content input stream
      relativeRoot - the relative root
      override - whether to override existing
      excludeRootFolderName - the exclude root folder name
      filter - map of old/new string for replacement in paths
      Throws:
      RepositoryImportException - in case the content cannot be imported