Package com.oracle.content.sdk
Class ContentSDK
java.lang.Object
com.oracle.content.sdk.ContentSDK
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ContentDeliveryClient
createDeliveryClient
(String contentServer, AuthenticationPolicy authenticationPolicy, @NotNull ContentSettings settings) Creates aContentDeliveryClient
given a valid server url and authentication policy, and provide additional settings such as enabling caching or changing the timeout.static @NotNull ContentDeliveryClient
createDeliveryClient
(String contentServer, String channelToken) Creates aContentDeliveryClient
given a valid server url and channel token.static @NotNull ContentDeliveryClient
createDeliveryClient
(String contentServer, String channelToken, @NotNull ContentSettings settings) Creates aContentDeliveryClient
given a valid server url and channel token, and provide additional settings such as enabling caching or changing the timeout.static void
setLoggingPolicy
(@NotNull ContentLogging contentLogging) Specifies a custom logging policy.static void
setLogLevel
(ContentLogging.LogLevel logLevel) Set the logging level globally for all SDK clients.
-
Constructor Details
-
ContentSDK
public ContentSDK()
-
-
Method Details
-
createDeliveryClient
@NotNull public static @NotNull ContentDeliveryClient createDeliveryClient(String contentServer, String channelToken) Creates aContentDeliveryClient
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 aContentException
if the server or channel token are null or empty.- Parameters:
contentServer
- the URL to a server instancechannelToken
- channel token required for authentication- Returns:
- new
ContentDeliveryClient
-
createDeliveryClient
@NotNull public static @NotNull ContentDeliveryClient createDeliveryClient(String contentServer, String channelToken, @NotNull @NotNull ContentSettings settings) Creates aContentDeliveryClient
given a valid server url and channel token, and provide additional settings such as enabling caching or changing the timeout. SeeContentSettings
- Parameters:
contentServer
- the URL to a server instancechannelToken
- channel token required for authenticationsettings
- Settings for the SDK- Returns:
- new
ContentDeliveryClient
-
createDeliveryClient
@NotNull public static @NotNull ContentDeliveryClient createDeliveryClient(String contentServer, AuthenticationPolicy authenticationPolicy, @NotNull @NotNull ContentSettings settings) Creates aContentDeliveryClient
given a valid server url and authentication policy, and provide additional settings such as enabling caching or changing the timeout. SeeContentSettings
- Parameters:
contentServer
- the URL to a server instanceauthenticationPolicy
- authentication policy to use for SDKsettings
- Settings for the SDK- Returns:
- new
ContentDeliveryClient
-
setLogLevel
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 usingContentLogging.LogLevel
-
setLoggingPolicy
Specifies a custom logging policy. Use this method if you want to intercept the SDK log output for your own use. SeeContentLogging
- Parameters:
contentLogging
- ValidContentLogging
-