public class IrisClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.impl.client.DefaultHttpClient |
httpClient |
| Constructor and Description |
|---|
IrisClient(String accountId,
String userName,
String password) |
IrisClient(String uri,
String accountId,
String userName,
String password,
String version) |
| Modifier and Type | Method and Description |
|---|---|
String |
buildAccountModelUri(String[] tokens) |
String |
buildAccountModelUri(String[] tokens,
Map<String,Object> query) |
String |
buildAccountModelUri(String uriSuffix,
Map<String,Object> query) |
String |
buildModelUri(String[] tokens) |
String |
buildModelUri(String[] tokens,
Map<String,Object> query) |
void |
checkResponse(BaseResponse response) |
IrisResponse |
delete(String uri) |
protected IrisResponse |
executeRequest(org.apache.http.client.methods.HttpUriRequest request) |
IrisResponse |
get(String uri) |
<T> T |
get(String uri,
Class<T> returnType) |
String |
getIdFromLocationHeader(String locationHeader) |
IrisResponse |
post(String uri,
BaseModel data) |
<T> T |
post(String uri,
BaseModel data,
Class<T> returnType) |
void |
postFile(String uri,
File file,
String contentType) |
IrisResponse |
put(String uri,
BaseModel data) |
<T> T |
put(String uri,
BaseModel data,
Class<T> returnType) |
void |
putFile(String uri,
File file,
String contentType) |
public IrisClient(String uri, String accountId, String userName, String password, String version)
public IrisResponse get(String uri) throws Exception
Exceptionpublic <T> T post(String uri, BaseModel data, Class<T> returnType) throws Exception
Exceptionpublic IrisResponse post(String uri, BaseModel data) throws Exception
Exceptionpublic IrisResponse delete(String uri) throws Exception
Exceptionpublic <T> T put(String uri, BaseModel data, Class<T> returnType) throws Exception
Exceptionpublic IrisResponse put(String uri, BaseModel data) throws Exception
Exceptionpublic void postFile(String uri, File file, String contentType) throws Exception
Exceptionpublic void putFile(String uri, File file, String contentType) throws Exception
Exceptionpublic String buildAccountModelUri(String uriSuffix, Map<String,Object> query) throws URISyntaxException
URISyntaxExceptionpublic String buildAccountModelUri(String[] tokens) throws URISyntaxException
URISyntaxExceptionpublic String buildAccountModelUri(String[] tokens, Map<String,Object> query) throws URISyntaxException
URISyntaxExceptionpublic String buildModelUri(String[] tokens, Map<String,Object> query) throws URISyntaxException
URISyntaxExceptionpublic String buildModelUri(String[] tokens) throws URISyntaxException
URISyntaxExceptionprotected IrisResponse executeRequest(org.apache.http.client.methods.HttpUriRequest request) throws Exception
Exceptionpublic void checkResponse(BaseResponse response) throws IrisClientException
IrisClientExceptionCopyright © 2018. All rights reserved.