Class ClientForDBAdminAPIs

java.lang.Object
io.lionweb.repoclient.impl.ClientForDBAdminAPIs
All Implemented Interfaces:
DBAdminAPIClient

public class ClientForDBAdminAPIs extends Object implements DBAdminAPIClient
  • Field Details

    • JSON

      protected static final okhttp3.MediaType JSON
    • conf

      protected final RepoClientConfiguration conf
    • gson

      protected final com.google.gson.Gson gson
  • Constructor Details

  • Method Details

    • createRepository

      public void createRepository(@NotNull @NotNull RepositoryConfiguration repositoryConfiguration) throws IOException
      Specified by:
      createRepository in interface DBAdminAPIClient
      Throws:
      IOException
    • deleteRepository

      public void deleteRepository(@NotNull @NotNull String repositoryName) throws IOException
      Specified by:
      deleteRepository in interface DBAdminAPIClient
      Throws:
      IOException
    • createDatabase

      public void createDatabase() throws IOException
      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 interface DBAdminAPIClient
      Throws:
      IOException
    • listRepositories

      @NotNull public @NotNull Set<RepositoryConfiguration> listRepositories() throws IOException
      Specified by:
      listRepositories in interface DBAdminAPIClient
      Throws:
      IOException
    • buildURL

      protected okhttp3.HttpUrl.Builder buildURL(String api)
    • buildURL

      protected okhttp3.HttpUrl.Builder buildURL(String api, boolean specifyingClientID, boolean specifyingRepository)
    • buildRequest

      protected okhttp3.Request.Builder buildRequest(String api)
    • buildRequest

      protected okhttp3.Request.Builder buildRequest(String api, boolean specifyingClientID, boolean specifyingRepository, boolean considerAuthenticationToken, Map<String,String> additionalParams)
    • 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)