Package io.lionweb.repoclient
Class RepoSerialization
java.lang.Object
io.lionweb.repoclient.RepoSerialization
This class contains the logic to store and retrieve entire repositories at once.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<C extends RawBulkAPIClient & BulkAPIClient>
voiddownloadRepoAsDirectory
(C apiClient, File directory) Download all the content of the repository accessed by the apiClient into a directory.<C extends RawBulkAPIClient & BulkAPIClient>
voiddownloadRepoAsZip
(C apiClient, File zipFile) Download all the content of the repository accessed by the apiClient into a zip file.void
simpleUploadDirectoryToRepo
(RawBulkAPIClient apiClient, File directory) Upload all the content of a directory to a given repository, using the standard bulk API (and not the more performant bulk import).void
simpleUploadZipToRepo
(RawBulkAPIClient apiClient, File zip) Upload all the content of a zip to a given repository, using the standard bulk API (and not the more performant bulk import).void
uploadDirectoryToRepoUsingBulkImport
(AdditionalAPIClient apiClient, File directory) Upload all the content of a directory to a given repository, using the bulkImport operation (and not the standard bulk operations).void
uploadZipToRepoUsingBulkImport
(AdditionalAPIClient apiClient, File zip) Upload all the content of a zip to a given repository, using the bulkImport operation (and not the standard bulk operations).
-
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
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
-