Package nl.knaw.dans.lib.dataverse
Class DataverseClientConfig
java.lang.Object
nl.knaw.dans.lib.dataverse.DataverseClientConfig
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionDataverseClientConfig
(URI baseUrl) Configuration settings for theDataverseClient
.DataverseClientConfig
(URI baseUrl, String apiToken) Configuration settings for theDataverseClient
.DataverseClientConfig
(URI baseUrl, String apiToken, int awaitLockStateMaxNumberOfRetries, int awaitLockStateMillisecondsBetweenRetries, int awaitIndexingMaxNumberOfRetries, int awaitIndexingMillisecondsBetweenRetries, String unblockKey) Configuration settings for theDataverseClient
.DataverseClientConfig
(URI baseUrl, String apiToken, String unblockKey) Configuration settings for theDataverseClient
. -
Method Summary
-
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 theDataverseClient
.- Parameters:
baseUrl
- the base URL of the Dataverse server to communicate withapiToken
- the API token used for authorizationawaitLockStateMaxNumberOfRetries
- the maximum number of tries forDatasetApi.awaitLock(String)
API (default 30)awaitLockStateMillisecondsBetweenRetries
- the number of milliseconds to wait between tries forDatasetApi.awaitLock(String)
API (default 500)awaitIndexingMaxNumberOfRetries
- the maximum number of tries forDatasetApi.publish(UpdateType, boolean)
API (default 15)awaitIndexingMillisecondsBetweenRetries
- the number of milliseconds to wait between tries forDatasetApi.publish(UpdateType, boolean)
API (default 1000)unblockKey
- a key required for admin tasks when not running on localhost
-
DataverseClientConfig
Configuration settings for theDataverseClient
.- Parameters:
baseUrl
- the base URL of the Dataverse server to communicate withapiToken
- the API token used for authorizationunblockKey
- a key required for admin tasks when not running on localhost
-
DataverseClientConfig
Configuration settings for theDataverseClient
.- Parameters:
baseUrl
- the base URL of the Dataverse server to communicate withapiToken
- the API token used for authorization
-
DataverseClientConfig
Configuration settings for theDataverseClient
. 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
-
getApiToken
-
getUnblockKey
-