Package com.atlassian.confluence.it
Class RestHelper
- java.lang.Object
-
- com.atlassian.confluence.it.RestHelper
-
@Deprecated public class RestHelper extends Object
Deprecated.since 6.4 Usecom.atlassian.confluence.test.stateless.ConfluenceStatelessRestTestRunnerinsteadProvides methods for creating REST WebResource objects and processing REST calls.
-
-
Field Summary
Fields Modifier and Type Field Description static StringBASE_URLDeprecated.since 5.6 UseBaseUrlSelector.getBaseUrl()static StringPROTOTYPE_REST_PATHDeprecated.
-
Constructor Summary
Constructors Constructor Description RestHelper()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voiddoDeleteJson(String url, User user)Deprecated.static <T> TdoGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass)Deprecated.static <T> TdoGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, String requestType)Deprecated.static @NonNull com.sun.jersey.api.client.ClientResponsedoGetRequest(com.sun.jersey.api.client.WebResource resource, String requestType)Deprecated.static URIdoPost(com.sun.jersey.api.client.WebResource resource, Object entity)Deprecated.static <T> TdoPut(com.sun.jersey.api.client.WebResource resource, T entity)Deprecated.static <T> TdoPut(com.sun.jersey.api.client.WebResource resource, T entity, String requestType)Deprecated.static <T> TdoRawGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass)Deprecated.Do a get without asserting successstatic <T> TdoRawGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, String requestType)Deprecated.Do a get without asserting success, specifying the request type.static com.sun.jersey.api.client.WebResourceexpand(com.sun.jersey.api.client.WebResource webResource, String... values)Deprecated.static com.sun.jersey.api.client.WebResourceexpandWithIndexes(com.sun.jersey.api.client.WebResource webResource, String value, int start, int end)Deprecated.static org.codehaus.jackson.JsonNodefetchJsonResponse(com.sun.jersey.api.client.WebResource resource)Deprecated.Send a GET request to the provided WebResource and return the response as a JSON object.static com.sun.jersey.api.client.ClientgetClient()Deprecated.Return a jersey client configured for Jackson annotations.static com.sun.jersey.api.client.ClientgetClient(@Nullable org.codehaus.jackson.map.Module jacksonModule)Deprecated.Returns a Client configured with the provided jackson module for custom deserialization.static StringgetJsonResponseString(com.sun.jersey.api.client.WebResource resource)Deprecated.Send a GET request to the provided WebResource and return the response as a JSON string.static StringgetPrototypeRestBaseUrl(BaseUrlSelector baseUrlSelector)Deprecated.static StringgetPrototypeRestBaseUrl(com.atlassian.confluence.test.BaseUrlSelector baseUrlSelector)Deprecated.static StringgetPrototypeRestBaseUrl(String baseUrl)Deprecated.static com.sun.jersey.api.client.ClientnewClient()Deprecated.Create a new Jersey client configured for Jackson annotations.static com.sun.jersey.api.client.ClientnewClient(@Nullable org.codehaus.jackson.map.Module jacksonModule)Deprecated.Creates a new client configured with the provided jackson module for custom deserializationstatic com.sun.jersey.api.client.WebResource.BuildernewJsonResource(String url, User user)Deprecated.Returns a new web resource accepting JSON, with OS credentials for the passed user.static @NonNull com.sun.jersey.api.client.WebResourcenewResource(@Nullable String url, @Nullable User user)Deprecated.Returns a new web resource with OS credentials for the passed user.static com.sun.jersey.api.client.WebResourcenewResource(User user)Deprecated.since 5.6 UsenewResource(String, User)static org.codehaus.jackson.JsonNodepostJson(String url, String jsonPayload, User user)Deprecated.static voidpostJsonWithNoResponse(String url, String jsonPayload, User user)Deprecated.
-
-
-
Field Detail
-
BASE_URL
@Deprecated public static final String BASE_URL
Deprecated.since 5.6 UseBaseUrlSelector.getBaseUrl()
-
PROTOTYPE_REST_PATH
public static final String PROTOTYPE_REST_PATH
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
newResource
@Deprecated public static com.sun.jersey.api.client.WebResource newResource(User user)
Deprecated.since 5.6 UsenewResource(String, User)
-
newClient
public static com.sun.jersey.api.client.Client newClient()
Deprecated.Create a new Jersey client configured for Jackson annotations.
-
newClient
public static com.sun.jersey.api.client.Client newClient(@Nullable org.codehaus.jackson.map.Module jacksonModule)
Deprecated.Creates a new client configured with the provided jackson module for custom deserialization
-
getClient
public static com.sun.jersey.api.client.Client getClient(@Nullable org.codehaus.jackson.map.Module jacksonModule)
Deprecated.Returns a Client configured with the provided jackson module for custom deserialization. May return a client previously used, or currently in use, by another test.
-
getClient
public static com.sun.jersey.api.client.Client getClient()
Deprecated.Return a jersey client configured for Jackson annotations. May return a client previously used, or currently in use, by another test.
-
newResource
public static @NonNull com.sun.jersey.api.client.WebResource newResource(@Nullable String url, @Nullable User user)
Deprecated.Returns a new web resource with OS credentials for the passed user.
-
newJsonResource
public static com.sun.jersey.api.client.WebResource.Builder newJsonResource(String url, User user)
Deprecated.Returns a new web resource accepting JSON, with OS credentials for the passed user.
-
fetchJsonResponse
public static org.codehaus.jackson.JsonNode fetchJsonResponse(com.sun.jersey.api.client.WebResource resource)
Deprecated.Send a GET request to the provided WebResource and return the response as a JSON object.
-
getJsonResponseString
public static String getJsonResponseString(com.sun.jersey.api.client.WebResource resource)
Deprecated.Send a GET request to the provided WebResource and return the response as a JSON string.
-
postJson
public static org.codehaus.jackson.JsonNode postJson(String url, String jsonPayload, User user) throws IOException
Deprecated.- Throws:
IOException
-
postJsonWithNoResponse
public static void postJsonWithNoResponse(String url, String jsonPayload, User user)
Deprecated.
-
doGet
public static <T> T doGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass)Deprecated.
-
doGet
public static <T> T doGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, String requestType)Deprecated.
-
getPrototypeRestBaseUrl
public static String getPrototypeRestBaseUrl(BaseUrlSelector baseUrlSelector)
Deprecated.
-
getPrototypeRestBaseUrl
public static String getPrototypeRestBaseUrl(com.atlassian.confluence.test.BaseUrlSelector baseUrlSelector)
Deprecated.
-
doRawGet
public static <T> T doRawGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass)Deprecated.Do a get without asserting success
-
doRawGet
public static <T> T doRawGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, String requestType)Deprecated.Do a get without asserting success, specifying the request type.
-
doGetRequest
public static @NonNull com.sun.jersey.api.client.ClientResponse doGetRequest(com.sun.jersey.api.client.WebResource resource, String requestType)Deprecated.
-
doPut
public static <T> T doPut(com.sun.jersey.api.client.WebResource resource, T entity)Deprecated.
-
doPut
public static <T> T doPut(com.sun.jersey.api.client.WebResource resource, T entity, String requestType)Deprecated.
-
doPost
public static URI doPost(com.sun.jersey.api.client.WebResource resource, Object entity)
Deprecated.
-
expand
public static com.sun.jersey.api.client.WebResource expand(com.sun.jersey.api.client.WebResource webResource, String... values)Deprecated.
-
expandWithIndexes
public static com.sun.jersey.api.client.WebResource expandWithIndexes(com.sun.jersey.api.client.WebResource webResource, String value, int start, int end)Deprecated.
-
-