Package io.lionweb.repoclient.impl
Class ClientForDBAdminAPIs
java.lang.Object
io.lionweb.repoclient.impl.ClientForDBAdminAPIs
- All Implemented Interfaces:
DBAdminAPIClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final RepoClientConfiguration
protected final com.google.gson.Gson
protected static final okhttp3.MediaType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected okhttp3.Request.Builder
addGZipCompressionHeader
(okhttp3.Request.Builder builder) protected okhttp3.Request.Builder
buildRequest
(String api) protected okhttp3.Request.Builder
buildRequest
(String api, boolean specifyingClientID, boolean specifyingRepository, boolean considerAuthenticationToken, Map<String, String> additionalParams) protected okhttp3.HttpUrl.Builder
protected okhttp3.HttpUrl.Builder
protected okhttp3.Request.Builder
considerAuthenticationToken
(okhttp3.Request.Builder builder) void
Trigger the creation of the database, according to the configuration provided on the server side.void
createRepository
(@NotNull RepositoryConfiguration repositoryConfiguration) void
deleteRepository
(@NotNull String repositoryName) protected @Nullable RepositoryVersionToken
getRepoVersionFromResponse
(String responseBody) @NotNull Set<RepositoryConfiguration>
protected <R> R
performCall
(okhttp3.Request request, io.lionweb.repoclient.impl.LionWebRepoClientImplHelper.ResponseHandler<R> responseHandler)
-
Field Details
-
JSON
protected static final okhttp3.MediaType JSON -
conf
-
gson
protected final com.google.gson.Gson gson
-
-
Constructor Details
-
ClientForDBAdminAPIs
-
-
Method Details
-
createRepository
public void createRepository(@NotNull @NotNull RepositoryConfiguration repositoryConfiguration) throws IOException - Specified by:
createRepository
in interfaceDBAdminAPIClient
- Throws:
IOException
-
deleteRepository
- Specified by:
deleteRepository
in interfaceDBAdminAPIClient
- Throws:
IOException
-
createDatabase
Description copied from interface:DBAdminAPIClient
Trigger the creation of the database, according to the configuration provided on the server side. In other words, we cannot dictate the name of the configuration of the database, just triggers its creation.- Specified by:
createDatabase
in interfaceDBAdminAPIClient
- Throws:
IOException
-
listRepositories
- Specified by:
listRepositories
in interfaceDBAdminAPIClient
- Throws:
IOException
-
buildURL
-
buildURL
protected okhttp3.HttpUrl.Builder buildURL(String api, boolean specifyingClientID, boolean specifyingRepository) -
buildRequest
-
buildRequest
-
performCall
protected <R> R performCall(okhttp3.Request request, io.lionweb.repoclient.impl.LionWebRepoClientImplHelper.ResponseHandler<R> responseHandler) throws IOException - Throws:
IOException
-
considerAuthenticationToken
protected okhttp3.Request.Builder considerAuthenticationToken(okhttp3.Request.Builder builder) -
addGZipCompressionHeader
protected okhttp3.Request.Builder addGZipCompressionHeader(okhttp3.Request.Builder builder) -
getRepoVersionFromResponse
@Nullable protected @Nullable RepositoryVersionToken getRepoVersionFromResponse(String responseBody)
-