Class RepositoryZipExporter
java.lang.Object
org.eclipse.dirigible.repository.zip.RepositoryZipExporter
public class RepositoryZipExporter extends Object
Utility class which exports all the content under a given path.
-
Constructor Summary
Constructors Constructor Description RepositoryZipExporter() -
Method Summary
Modifier and Type Method Description static byte[]exportZip(IRepository repository, String relativeRoot, boolean inclusive)Export all the content under the given path with the target repository instance Include or NOT the last segment of the relative root during the archiving.static byte[]exportZip(IRepository repository, List<String> relativeRoots)Export all the content under the given path(s) with the target repository instance Include the last segment of the relative roots during the archiving.
-
Constructor Details
-
RepositoryZipExporter
public RepositoryZipExporter()
-
-
Method Details
-
exportZip
public static byte[] exportZip(IRepository repository, List<String> relativeRoots) throws RepositoryExportExceptionExport all the content under the given path(s) with the target repository instance Include the last segment of the relative roots during the archiving.- Parameters:
repository- the targetIRepositoryinstancerelativeRoots- the relative roots- Returns:
- the exported content
- Throws:
RepositoryExportException- in case the content cannot be exported
-
exportZip
public static byte[] exportZip(IRepository repository, String relativeRoot, boolean inclusive) throws RepositoryExportExceptionExport all the content under the given path with the target repository instance Include or NOT the last segment of the relative root during the archiving.- Parameters:
repository- the repositoryrelativeRoot- single rootinclusive- whether to include the last segment of the root or to pack its content directly in the archive- Returns:
- the exported content
- Throws:
RepositoryExportException- in case the content cannot be exported
-