Class DataverseClientConfig

java.lang.Object
nl.knaw.dans.lib.dataverse.DataverseClientConfig

public class DataverseClientConfig extends Object
  • Field Details

    • DEFAULT_AWAIT_LOCK_STATE_MAX_NUMBER_OF_RETRIES

      public static final int DEFAULT_AWAIT_LOCK_STATE_MAX_NUMBER_OF_RETRIES
      See Also:
    • DEFAULT_AWAIT_LOCK_STATE_MILLISECONDS_BETWEEN_RETRIES

      public static final int DEFAULT_AWAIT_LOCK_STATE_MILLISECONDS_BETWEEN_RETRIES
      See Also:
    • DEFAULT_AWAIT_INDEXING_MAX_NUMBER_OF_RETRIES

      public static final int DEFAULT_AWAIT_INDEXING_MAX_NUMBER_OF_RETRIES
      See Also:
    • DEFAULT_AWAIT_INDEXING_MILLISECONDS_BETWEEN_RETRIES

      public static final int DEFAULT_AWAIT_INDEXING_MILLISECONDS_BETWEEN_RETRIES
      See Also:
  • Constructor Details

    • DataverseClientConfig

      public DataverseClientConfig(URI baseUrl, String apiToken, int awaitLockStateMaxNumberOfRetries, int awaitLockStateMillisecondsBetweenRetries, int awaitIndexingMaxNumberOfRetries, int awaitIndexingMillisecondsBetweenRetries, String unblockKey)
      Configuration settings for the DataverseClient.
      Parameters:
      baseUrl - the base URL of the Dataverse server to communicate with
      apiToken - the API token used for authorization
      awaitLockStateMaxNumberOfRetries - the maximum number of tries for DatasetApi.awaitLock(String) API (default 30)
      awaitLockStateMillisecondsBetweenRetries - the number of milliseconds to wait between tries for DatasetApi.awaitLock(String) API (default 500)
      awaitIndexingMaxNumberOfRetries - the maximum number of tries for DatasetApi.publish(UpdateType, boolean) API (default 15)
      awaitIndexingMillisecondsBetweenRetries - the number of milliseconds to wait between tries for DatasetApi.publish(UpdateType, boolean) API (default 1000)
      unblockKey - a key required for admin tasks when not running on localhost
    • DataverseClientConfig

      public DataverseClientConfig(URI baseUrl, String apiToken, String unblockKey)
      Configuration settings for the DataverseClient.
      Parameters:
      baseUrl - the base URL of the Dataverse server to communicate with
      apiToken - the API token used for authorization
      unblockKey - a key required for admin tasks when not running on localhost
    • DataverseClientConfig

      public DataverseClientConfig(URI baseUrl, String apiToken)
      Configuration settings for the DataverseClient.
      Parameters:
      baseUrl - the base URL of the Dataverse server to communicate with
      apiToken - the API token used for authorization
    • DataverseClientConfig

      public DataverseClientConfig(URI baseUrl)
      Configuration settings for the DataverseClient. No API token is specified, so the client will only able to access endpoints that require no account.
      Parameters:
      baseUrl - the base URL of the Dataverse server to communicate with
  • Method Details

    • getBaseUrl

      public URI getBaseUrl()
    • getApiToken

      public String getApiToken()
    • getUnblockKey

      public String getUnblockKey()