Package ubic.gemma.core.util
Class GemmaRestApiClientImpl
java.lang.Object
ubic.gemma.core.util.GemmaRestApiClientImpl
- All Implemented Interfaces:
GemmaRestApiClient
-
Nested Class Summary
Nested classes/interfaces inherited from interface ubic.gemma.core.util.GemmaRestApiClient
GemmaRestApiClient.DataResponse, GemmaRestApiClient.EmptyResponse, GemmaRestApiClient.ErrorResponse, GemmaRestApiClient.Response
-
Constructor Summary
ConstructorsConstructorDescriptionGemmaRestApiClientImpl
(String hostUrl) GemmaRestApiClientImpl
(String hostUrl, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear any credentials.Access a given REST endpoint.Access a given endpoint REST endpoint with parameters.void
setAuthentication
(org.springframework.security.core.Authentication authentication) Set credentials used for authenticating API requests.
-
Constructor Details
-
GemmaRestApiClientImpl
-
GemmaRestApiClientImpl
public GemmaRestApiClientImpl(String hostUrl, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
getHostUrl
- Specified by:
getHostUrl
in interfaceGemmaRestApiClient
-
setAuthentication
public void setAuthentication(org.springframework.security.core.Authentication authentication) Description copied from interface:GemmaRestApiClient
Set credentials used for authenticating API requests.- Specified by:
setAuthentication
in interfaceGemmaRestApiClient
-
clearAuthentication
public void clearAuthentication()Description copied from interface:GemmaRestApiClient
Clear any credentials.- Specified by:
clearAuthentication
in interfaceGemmaRestApiClient
-
perform
Description copied from interface:GemmaRestApiClient
Access a given REST endpoint.- Specified by:
perform
in interfaceGemmaRestApiClient
- Throws:
IOException
-
perform
public GemmaRestApiClient.Response perform(String endpoint, org.springframework.util.MultiValueMap<String, Object> params) throws IOExceptionDescription copied from interface:GemmaRestApiClient
Access a given endpoint REST endpoint with parameters.- Specified by:
perform
in interfaceGemmaRestApiClient
- Throws:
IOException
- if anything goes wrong with I/O including issues with JSON deserialization
-
perform
public GemmaRestApiClient.Response perform(String endpoint, String firstParamName, Object firstParamValue, Object... otherParams) throws IOException - Specified by:
perform
in interfaceGemmaRestApiClient
- Throws:
IOException
-