|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.it.RestHelper
public class RestHelper
Provides methods for creating REST WebResource objects and processing REST calls.
| Field Summary | |
|---|---|
static String |
BASE_URL
|
static String |
REST_PATH
|
| Constructor Summary | |
|---|---|
RestHelper()
|
|
| Method Summary | ||
|---|---|---|
static
|
doGet(com.sun.jersey.api.client.WebResource resource,
Class<T> entityClass)
|
|
static
|
doGet(com.sun.jersey.api.client.WebResource resource,
Class<T> entityClass,
String requestType)
|
|
static
|
doRawGet(com.sun.jersey.api.client.WebResource resource,
Class<T> entityClass)
Do a get without asserting success |
|
static String |
getFullRestPath()
|
|
static com.sun.jersey.api.client.ClientResponse |
getGETResponse(String relativePath,
User user,
Map<String,String> params)
|
|
static JSONObject |
getJsonResponse(com.sun.jersey.api.client.WebResource resource)
Send a GET request to the provided WebResource and return the response as a JSON object. |
|
static com.sun.jersey.api.client.WebResource.Builder |
newJsonResource(String url,
User user)
Returns a new web resource accepting JSON, with OS credentials for the passed user. |
|
static com.sun.jersey.api.client.WebResource |
newResource(String url,
User user)
Returns a new web resource with OS credentials for the passed user. |
|
static com.sun.jersey.api.client.WebResource |
newResource(User user)
|
|
static JSONObject |
postJson(String url,
String jsonPayload,
User user)
|
|
static void |
postJsonWithNoResponse(String url,
String jsonPayload,
User user)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BASE_URL
public static final String REST_PATH
| Constructor Detail |
|---|
public RestHelper()
| Method Detail |
|---|
public static com.sun.jersey.api.client.WebResource newResource(User user)
public static com.sun.jersey.api.client.WebResource newResource(String url,
User user)
public static com.sun.jersey.api.client.WebResource.Builder newJsonResource(String url,
User user)
public static JSONObject getJsonResponse(com.sun.jersey.api.client.WebResource resource)
throws JSONException
JSONException
public static JSONObject postJson(String url,
String jsonPayload,
User user)
throws JSONException
JSONException
public static void postJsonWithNoResponse(String url,
String jsonPayload,
User user)
throws JSONException
JSONException
public static <T> T doGet(com.sun.jersey.api.client.WebResource resource,
Class<T> entityClass)
public static <T> T doGet(com.sun.jersey.api.client.WebResource resource,
Class<T> entityClass,
String requestType)
public static String getFullRestPath()
public static com.sun.jersey.api.client.ClientResponse getGETResponse(String relativePath,
User user,
Map<String,String> params)
public static <T> T doRawGet(com.sun.jersey.api.client.WebResource resource,
Class<T> entityClass)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||