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
Modifier and TypeFieldDescriptionprotected final nl.knaw.dans.lib.dataverse.HttpClientWrapper
protected static final String
-
Method Summary
Modifier and TypeMethodDescriptionaddLicense
(License license) protected Path
deleteLicense
(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:
IOException
DataverseException
-
getLicenseById
public DataverseHttpResponse<License> getLicenseById(long id) throws IOException, DataverseException - Throws:
IOException
DataverseException
-
addLicense
public DataverseHttpResponse<DataMessage> addLicense(License license) throws IOException, DataverseException - Throws:
IOException
DataverseException
-
getDefaultLicense
public DataverseHttpResponse<DataMessage> getDefaultLicense() throws IOException, DataverseException- Throws:
IOException
DataverseException
-
setDefaultLicense
public DataverseHttpResponse<DataMessage> setDefaultLicense(long id) throws IOException, DataverseException - Throws:
IOException
DataverseException
-
setActiveState
public DataverseHttpResponse<DataMessage> setActiveState(long id, boolean active) throws IOException, DataverseException - Throws:
IOException
DataverseException
-
deleteLicense
public DataverseHttpResponse<DataMessage> deleteLicense(long id) throws IOException, DataverseException - Throws:
IOException
DataverseException
-
toString
-
buildPath
-
getQueryParamsFromMetadataKeys
-