public abstract class OauthClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.web.client.RestTemplate |
restTemplate |
| Constructor and Description |
|---|
OauthClient() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
doExchange(String url,
Map<String,?> variables,
Object bodyJson,
Class clazz,
boolean retry) |
<T> T |
exchange(String url,
Class clazz) |
<T> T |
exchange(String url,
Map<String,?> variables,
Class clazz) |
<T> T |
exchange(String url,
Map<String,?> variables,
Object postObject,
Class clazz)
Simple GET or POST, that returns an already deserialized response object.
|
<T> T |
exchange(String url,
Object bodyJson,
Class clazz) |
protected abstract String |
getAccessToken()
Template method that defines how to get hold of an access token.
|
protected <T> T |
getListResult(T[] body) |
public <T> T exchange(String url, Map<String,?> variables, Object postObject, Class clazz)
T - The response typeurl - Complete URL, probably containing placeholders for variablesvariables - variables to replace into the URLpostObject - body to POST. Will be serialized.clazz - Class to deserialize intoprotected <T> T doExchange(String url, Map<String,?> variables, Object bodyJson, Class clazz, boolean retry)
protected <T> T getListResult(T[] body)
protected abstract String getAccessToken()
Copyright © 2013–2014 SURFnet bv, The Netherlands. All rights reserved.