Package com.complexible.stardog.api.admin

# Class AdminConnectionConfiguration

java.lang.Object
com.complexible.stardog.api.AbstractConnectionConfiguration<AdminConnection>
com.complexible.stardog.api.admin.AdminConnectionConfiguration

All Implemented Interfaces:
  `LoginConnectionConfiguration<AdminConnection>`

public final class AdminConnectionConfiguration extends AbstractConnectionConfiguration<AdminConnection>

Version:
  2.0
Author:
  Hector Perez-Urbina

- ## Field Summary

  ### Fields inherited from class com.complexible.stardog.api.AbstractConnectionConfiguration

  `CONNECTION_TYPE, mOptionParser, mOptions, RUN_AS_USER`

  ### Fields inherited from interface com.complexible.stardog.api.LoginConnectionConfiguration

  `BEARER, CREDENTIALS, CREDENTIALS_SUPPLIER, IS_TOKEN, KRB5_REVERSE_DNS, PASSWORD, SERVER, USERNAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AdminConnectionConfiguration()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AdminConnection`
  `connect()`
  Open the connection to the database as described by this configuration.
  `AdminConnectionConfiguration`
  `credentials(ConnectionCredentials theConnectionCredentials)`
  Specify the credentials that should be used to authenticate to the database.
  `AdminConnectionConfiguration`
  `credentials(String theAPIToken)`
  Specify the API token that should be used to authenticate to the database.
  `AdminConnectionConfiguration`
  `credentials(String theUsername, String thePassword)`
  Specify the username and password that should be used to authenticate to the database.
  `AdminConnectionConfiguration`
  `credentialSupplier(Supplier<ConnectionCredentials> theSupplier)`
  Specify the supplier which will provide credentials at the time which they will be used.
  `AdminConnectionConfiguration`
  `runningAs(String theUserName)`
  Run commands passed to this connection as the given user
  `AdminConnectionConfiguration`
  `server(String theServerURL)`
  Specify the URL of the database server.
  `static AdminConnectionConfiguration`
  `toServer(String theServerURL)`

  ### Methods inherited from class com.complexible.stardog.api.AbstractConnectionConfiguration

  `getOptions, set, setAll`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AdminConnectionConfiguration

    public AdminConnectionConfiguration()

- ## Method Details

  - ### server

    public AdminConnectionConfiguration server(String theServerURL)
    Specify the URL of the database server.
    Specified by:
      `server` in interface `LoginConnectionConfiguration<AdminConnection>`
    Overrides:
      `server` in class `AbstractConnectionConfiguration<AdminConnection>`
    Parameters:
      `theServerURL` - the server url
    Returns:
      this configuration

  - ### credentials

    public AdminConnectionConfiguration credentials(String theUsername, String thePassword)
    Specify the username and password that should be used to authenticate to the database.
    Specified by:
      `credentials` in interface `LoginConnectionConfiguration<AdminConnection>`
    Overrides:
      `credentials` in class `AbstractConnectionConfiguration<AdminConnection>`
    Parameters:
      `theUsername` - the username
      `thePassword` - the password
    Returns:
      this configuration

  - ### credentials

    public AdminConnectionConfiguration credentials(ConnectionCredentials theConnectionCredentials)
    Specify the credentials that should be used to authenticate to the database.
    Specified by:
      `credentials` in interface `LoginConnectionConfiguration<AdminConnection>`
    Overrides:
      `credentials` in class `AbstractConnectionConfiguration<AdminConnection>`
    Parameters:
      `theConnectionCredentials` - the credentials
    Returns:
      this configuration

  - ### credentials

    public AdminConnectionConfiguration credentials(String theAPIToken)
    Description copied from interface: `LoginConnectionConfiguration`
    Specify the API token that should be used to authenticate to the database. No other credentials info (username or password) is needed if an API token is provided.
    Specified by:
      `credentials` in interface `LoginConnectionConfiguration<AdminConnection>`
    Overrides:
      `credentials` in class `AbstractConnectionConfiguration<AdminConnection>`
    Returns:
      this configuration

  - ### credentialSupplier

    public AdminConnectionConfiguration credentialSupplier(Supplier<ConnectionCredentials> theSupplier)
    Description copied from interface: `LoginConnectionConfiguration`
    Specify the supplier which will provide credentials at the time which they will be used.
    Specified by:
      `credentialSupplier` in interface `LoginConnectionConfiguration<AdminConnection>`
    Overrides:
      `credentialSupplier` in class `AbstractConnectionConfiguration<AdminConnection>`
    Parameters:
      `theSupplier` - the credential supplier
    Returns:
      this configuration

  - ### runningAs

    public AdminConnectionConfiguration runningAs(String theUserName)
    Run commands passed to this connection as the given user
    Overrides:
      `runningAs` in class `AbstractConnectionConfiguration<AdminConnection>`
    Parameters:
      `theUserName` - the username
    Returns:
      this object

  - ### connect

    public AdminConnection connect() throws StardogException
    Open the connection to the database as described by this configuration.
    Returns:
      the connection
    Throws:
      `StardogException` - if there was an error while opening the connection.

  - ### toServer

    public static AdminConnectionConfiguration toServer(String theServerURL)