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 voidimportZip(IRepository repository, ZipInputStream zipInputStream, String relativeRoot)Import all the content from a given zip to the target repository instance within the given path.static voidimportZip(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 voidimportZip(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 voidimportZip(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.
-
Constructor Details
-
RepositoryZipImporter
public RepositoryZipImporter()
-
-
Method Details
-
importZip
public static void importZip(IRepository repository, ZipInputStream zipInputStream, String relativeRoot) throws RepositoryImportExceptionImport all the content from a given zip to the target repository instance within the given path.- Parameters:
repository- the targetIRepositoryinstancezipInputStream- the content input streamrelativeRoot- 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 RepositoryImportExceptionImport all the content from a given zip to the target repository instance within the given path, overrides files during the pass.- Parameters:
repository- the targetIRepositoryinstancezipInputStream- the content input streamrelativeRoot- the relative rootoverride- 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 RepositoryImportExceptionImport 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 targetIRepositoryinstancezipInputStream- the content input streamrelativeRoot- the relative rootoverride- whether to override existingexcludeRootFolderName- 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 RepositoryImportExceptionImport 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 targetIRepositoryinstancezipInputStream- the content input streamrelativeRoot- the relative rootoverride- whether to override existingexcludeRootFolderName- the exclude root folder namefilter- map of old/new string for replacement in paths- Throws:
RepositoryImportException- in case the content cannot be imported
-