Package com.atlassian.confluence.it
Class RestHelper
java.lang.Object
com.atlassian.confluence.it.RestHelper
Deprecated.
Provides methods for creating REST WebResource objects and processing REST calls.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddoDeleteJson(String url, User user) Deprecated.static <T> TDeprecated.static <T> TDeprecated.static @NonNull com.sun.jersey.api.client.ClientResponsedoGetRequest(com.sun.jersey.api.client.WebResource resource, String requestType) Deprecated.static URIDeprecated.static <T> TdoPut(com.sun.jersey.api.client.WebResource resource, T entity) Deprecated.static <T> TDeprecated.static <T> TDeprecated.Do a get without asserting successstatic <T> TDeprecated.Do a get without asserting success, specifying the request type.static com.sun.jersey.api.client.WebResourceDeprecated.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.ClientDeprecated.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.ClientDeprecated.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.JsonNodeDeprecated.static voidpostJsonWithNoResponse(String url, String jsonPayload, User user) Deprecated.
-
Field Details
-
BASE_URL
Deprecated.since 5.6 UseBaseUrlSelector.getBaseUrl() -
PROTOTYPE_REST_PATH
Deprecated.- See Also:
-
-
Constructor Details
-
RestHelper
public RestHelper()Deprecated.
-
-
Method Details
-
newResource
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
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
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
Deprecated. -
doDeleteJson
Deprecated. -
doGet
Deprecated. -
doGet
public static <T> T doGet(com.sun.jersey.api.client.WebResource resource, Class<T> entityClass, String requestType) Deprecated. -
getPrototypeRestBaseUrl
Deprecated. -
getPrototypeRestBaseUrl
public static String getPrototypeRestBaseUrl(com.atlassian.confluence.test.BaseUrlSelector baseUrlSelector) Deprecated. -
getPrototypeRestBaseUrl
Deprecated. -
doRawGet
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
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.
-
com.atlassian.confluence.test.stateless.ConfluenceStatelessRestTestRunnerinstead