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 RepoClientConfigurationprotected final com.google.gson.Gsonprotected static final okhttp3.MediaType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected okhttp3.Request.BuilderaddGZipCompressionHeader(okhttp3.Request.Builder builder) protected okhttp3.Request.BuilderbuildRequest(String api) protected okhttp3.Request.BuilderbuildRequest(String api, boolean specifyingClientID, boolean specifyingRepository, boolean considerAuthenticationToken, Map<String, String> additionalParams) protected okhttp3.HttpUrl.Builderprotected okhttp3.HttpUrl.Builderprotected okhttp3.Request.BuilderconsiderAuthenticationToken(okhttp3.Request.Builder builder) voidTrigger the creation of the database, according to the configuration provided on the server side.voidcreateRepository(@NotNull RepositoryConfiguration repositoryConfiguration) voiddeleteRepository(@NotNull String repositoryName) protected @Nullable RepositoryVersionTokengetRepoVersionFromResponse(String responseBody) @NotNull Set<RepositoryConfiguration>protected <R> RperformCall(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:
createRepositoryin interfaceDBAdminAPIClient- Throws:
IOException
-
deleteRepository
- Specified by:
deleteRepositoryin interfaceDBAdminAPIClient- Throws:
IOException
-
createDatabase
Description copied from interface:DBAdminAPIClientTrigger 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:
createDatabasein interfaceDBAdminAPIClient- Throws:
IOException
-
listRepositories
- Specified by:
listRepositoriesin 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)
-