Package nl.knaw.dans.lib.dataverse
Class BuiltinUserApi
java.lang.Object
nl.knaw.dans.lib.dataverse.BuiltinUserApi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final nl.knaw.dans.lib.dataverse.HttpClientWrapperprotected static final String -
Method Summary
Modifier and TypeMethodDescriptionprotected PathCreates a built-in user from a JSON string with account data.create(BuiltinUser accountData, String password) Creates a built-in user from a model object.getQueryParamsFromMetadataKeys(Map<String, String> metadataKeys) toString()
-
Field Details
-
MDKEY_PARAM_NAME_PREFIX
- See Also:
-
httpClientWrapper
protected final nl.knaw.dans.lib.dataverse.HttpClientWrapper httpClientWrapper
-
-
Method Details
-
create
public DataverseHttpResponse<UserCreatedResult> create(String accountData, String password) throws DataverseException, IOException Creates a built-in user from a JSON string with account data.- Parameters:
accountData- JSON string with account datapassword- password for the new user- Returns:
- the created user
- Throws:
DataverseException- if the request failsIOException- if there is an I/O error
-
create
public DataverseHttpResponse<UserCreatedResult> create(BuiltinUser accountData, String password) throws DataverseException, IOException Creates a built-in user from a model object.- Parameters:
accountData- model object with account datapassword- password for the new user- Returns:
- the created user
- Throws:
DataverseException- if the request failsIOException- if there is an I/O error
-
toString
-
buildPath
-
getQueryParamsFromMetadataKeys
-