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 TypeMethodDescriptionvoidClear any credentials.Access a given REST endpoint.Access a given endpoint REST endpoint with parameters.voidsetAuthentication(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:
getHostUrlin interfaceGemmaRestApiClient
-
setAuthentication
public void setAuthentication(org.springframework.security.core.Authentication authentication) Description copied from interface:GemmaRestApiClientSet credentials used for authenticating API requests.- Specified by:
setAuthenticationin interfaceGemmaRestApiClient
-
clearAuthentication
public void clearAuthentication()Description copied from interface:GemmaRestApiClientClear any credentials.- Specified by:
clearAuthenticationin interfaceGemmaRestApiClient
-
perform
Description copied from interface:GemmaRestApiClientAccess a given REST endpoint.- Specified by:
performin interfaceGemmaRestApiClient- Throws:
IOException
-
perform
public GemmaRestApiClient.Response perform(String endpoint, org.springframework.util.MultiValueMap<String, Object> params) throws IOExceptionDescription copied from interface:GemmaRestApiClientAccess a given endpoint REST endpoint with parameters.- Specified by:
performin 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:
performin interfaceGemmaRestApiClient- Throws:
IOException
-