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.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • exportZip

      public static byte[] exportZip​(IRepository repository, List<String> relativeRoots) throws RepositoryExportException
      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.
      Parameters:
      repository - the target IRepository instance
      relativeRoots - 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 RepositoryExportException
      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.
      Parameters:
      repository - the repository
      relativeRoot - single root
      inclusive - 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