Class ContentSDK

java.lang.Object
com.oracle.content.sdk.ContentSDK

public final class ContentSDK extends Object
Main entry point for creating a delivery client using createDeliveryClient(String, String) or for setting the global logging options such as setLogLevel(ContentLogging.LogLevel).
  • Constructor Details

    • ContentSDK

      public ContentSDK()
  • Method Details

    • createDeliveryClient

      @NotNull public static @NotNull ContentDeliveryClient createDeliveryClient(String contentServer, String channelToken)
      Creates a ContentDeliveryClient given a valid server url and channel token. This is the simplest way to create a client as it uses all of the defaults for settings. This method will throw a ContentException if the server or channel token are null or empty.
      Parameters:
      contentServer - the URL to a server instance
      channelToken - channel token required for authentication
      Returns:
      new ContentDeliveryClient
    • createDeliveryClient

      @NotNull public static @NotNull ContentDeliveryClient createDeliveryClient(String contentServer, String channelToken, @NotNull @NotNull ContentSettings settings)
      Creates a ContentDeliveryClient given a valid server url and channel token, and provide additional settings such as enabling caching or changing the timeout. See ContentSettings
      Parameters:
      contentServer - the URL to a server instance
      channelToken - channel token required for authentication
      settings - Settings for the SDK
      Returns:
      new ContentDeliveryClient
    • createDeliveryClient

      @NotNull public static @NotNull ContentDeliveryClient createDeliveryClient(String contentServer, AuthenticationPolicy authenticationPolicy, @NotNull @NotNull ContentSettings settings)
      Creates a ContentDeliveryClient given a valid server url and authentication policy, and provide additional settings such as enabling caching or changing the timeout. See ContentSettings
      Parameters:
      contentServer - the URL to a server instance
      authenticationPolicy - authentication policy to use for SDK
      settings - Settings for the SDK
      Returns:
      new ContentDeliveryClient
    • setLogLevel

      public static void setLogLevel(ContentLogging.LogLevel logLevel)
      Set the logging level globally for all SDK clients. This must be called prior to any calls to create the delivery client.
      Parameters:
      logLevel - Specify the desired level of logging using ContentLogging.LogLevel
    • setLoggingPolicy

      public static void setLoggingPolicy(@NotNull @NotNull ContentLogging contentLogging)
      Specifies a custom logging policy. Use this method if you want to intercept the SDK log output for your own use. See ContentLogging
      Parameters:
      contentLogging - Valid ContentLogging