Class RepoSerialization

java.lang.Object
io.lionweb.repoclient.RepoSerialization

public class RepoSerialization extends Object
This class contains the logic to store and retrieve entire repositories at once.
  • Constructor Details

    • RepoSerialization

      public RepoSerialization()
  • Method Details

    • downloadRepoAsDirectory

      public <C extends RawBulkAPIClient & BulkAPIClient> void downloadRepoAsDirectory(C apiClient, File directory) throws IOException
      Download all the content of the repository accessed by the apiClient into a directory. In this directory one file per partition is created. The file is in JSON format.
      Throws:
      IOException
    • downloadRepoAsZip

      public <C extends RawBulkAPIClient & BulkAPIClient> void downloadRepoAsZip(C apiClient, File zipFile) throws IOException
      Download all the content of the repository accessed by the apiClient into a zip file. In this zip file, one entry per partition is created. The entry is in JSON format.
      Throws:
      IOException
    • simpleUploadDirectoryToRepo

      public void simpleUploadDirectoryToRepo(RawBulkAPIClient apiClient, File directory) throws IOException
      Upload all the content of a directory to a given repository, using the standard bulk API (and not the more performant bulk import). The directory and all the subdirectories are examined, looking for files with extension ".json" (ignoring case).
      Throws:
      IOException
    • uploadDirectoryToRepoUsingBulkImport

      public void uploadDirectoryToRepoUsingBulkImport(AdditionalAPIClient apiClient, File directory) throws IOException
      Upload all the content of a directory to a given repository, using the bulkImport operation (and not the standard bulk operations). The directory and all the subdirectories are examined, looking for files with extension ".json" (ignoring case).
      Throws:
      IOException
    • simpleUploadZipToRepo

      public void simpleUploadZipToRepo(RawBulkAPIClient apiClient, File zip) throws IOException
      Upload all the content of a zip to a given repository, using the standard bulk API (and not the more performant bulk import). All the zip is examined, looking for entries with extension ".json" (ignoring case).
      Throws:
      IOException
    • uploadZipToRepoUsingBulkImport

      public void uploadZipToRepoUsingBulkImport(AdditionalAPIClient apiClient, File zip) throws IOException
      Upload all the content of a zip to a given repository, using the bulkImport operation (and not the standard bulk operations). All the zip is examined, looking for entries with extension ".json" (ignoring case).
      Throws:
      IOException