Package nl.knaw.dans.lib.dataverse
Class LicenseApi
java.lang.Object
nl.knaw.dans.lib.dataverse.LicenseApi
License API end-points.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final nl.knaw.dans.lib.dataverse.HttpClientWrapperprotected static final String -
Method Summary
Modifier and TypeMethodDescriptionaddLicense(License license) protected PathdeleteLicense(long id) getLicenseById(long id) getQueryParamsFromMetadataKeys(Map<String, String> metadataKeys) setActiveState(long id, boolean active) setDefaultLicense(long id) toString()
-
Field Details
-
MDKEY_PARAM_NAME_PREFIX
- See Also:
-
httpClientWrapper
protected final nl.knaw.dans.lib.dataverse.HttpClientWrapper httpClientWrapper
-
-
Method Details
-
getLicenses
- Throws:
IOExceptionDataverseException
-
getLicenseById
public DataverseHttpResponse<License> getLicenseById(long id) throws IOException, DataverseException - Throws:
IOExceptionDataverseException
-
addLicense
public DataverseHttpResponse<DataMessage> addLicense(License license) throws IOException, DataverseException - Throws:
IOExceptionDataverseException
-
getDefaultLicense
public DataverseHttpResponse<DataMessage> getDefaultLicense() throws IOException, DataverseException- Throws:
IOExceptionDataverseException
-
setDefaultLicense
public DataverseHttpResponse<DataMessage> setDefaultLicense(long id) throws IOException, DataverseException - Throws:
IOExceptionDataverseException
-
setActiveState
public DataverseHttpResponse<DataMessage> setActiveState(long id, boolean active) throws IOException, DataverseException - Throws:
IOExceptionDataverseException
-
deleteLicense
public DataverseHttpResponse<DataMessage> deleteLicense(long id) throws IOException, DataverseException - Throws:
IOExceptionDataverseException
-
toString
-
buildPath
-
getQueryParamsFromMetadataKeys
-