Class RestClientUtil

java.lang.Object
com.atlassian.confluence.it.RestClientUtil

public class RestClientUtil extends Object
Provide utility feature for ConfluenceApacheHttpClient4 creation
Since:
8.8.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.sun.jersey.api.client.config.ClientConfig
    createConfig(Object... providers)
    Helper method to create a jersey client config with the given providers registered.
    static org.codehaus.jackson.map.Module
     
    static org.codehaus.jackson.jaxrs.JacksonJsonProvider
    createProvider(@Nullable org.codehaus.jackson.map.Module jacksonModule)
    Creates Provider instance to perform custom serialization needed for using the remote API model objects.
    static com.sun.jersey.api.client.Client
    Create a client with default configuration suitable for remotely communicating with the Confluence REST API.
    static com.sun.jersey.api.client.Client
    newClient(Object provider, Object... providers)
     
    static com.sun.jersey.api.client.Client
    newClient(org.codehaus.jackson.map.Module jacksonModule)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RestClientUtil

      public RestClientUtil()
  • Method Details

    • newClient

      public static com.sun.jersey.api.client.Client newClient()
      Create a client with default configuration suitable for remotely communicating with the Confluence REST API.
      Returns:
      a new jersey client that can serialize and deserialize confluence model objects.
    • newClient

      public static com.sun.jersey.api.client.Client newClient(org.codehaus.jackson.map.Module jacksonModule)
    • newClient

      public static com.sun.jersey.api.client.Client newClient(Object provider, Object... providers)
    • createConfig

      public static com.sun.jersey.api.client.config.ClientConfig createConfig(Object... providers)
      Helper method to create a jersey client config with the given providers registered.
      Parameters:
      providers - instances of providers annotated with Provider
    • createJacksonModule

      public static org.codehaus.jackson.map.Module createJacksonModule()
      Returns:
      the serialization module for serializing and deserializing java model objects.
    • createProvider

      public static org.codehaus.jackson.jaxrs.JacksonJsonProvider createProvider(@Nullable org.codehaus.jackson.map.Module jacksonModule)
      Creates Provider instance to perform custom serialization needed for using the remote API model objects. Registers the jacksonModule with the provider.
      Parameters:
      jacksonModule - custom serialization module to register with the provider