public class DeliveryOptions
extends java.lang.Object
DeliveryClient.| Modifier and Type | Class and Description |
|---|---|
static class |
DeliveryOptions.DeliveryOptionsBuilder |
| Constructor and Description |
|---|
DeliveryOptions() |
DeliveryOptions(java.lang.String projectId)
Constructs a setting instance of
DeliveryOptions using your Kontent.ai Project identifier. |
DeliveryOptions(java.lang.String projectId,
java.lang.String previewApiKey)
Constructs a settings instance of
DeliveryOptions using your Kontent.ai Project identifier and using
the preview API. |
DeliveryOptions(java.lang.String productionEndpoint,
java.lang.String previewEndpoint,
java.lang.String projectId,
java.lang.String productionApiKey,
java.lang.String previewApiKey,
boolean usePreviewApi,
boolean waitForLoadingNewContent,
int retryAttempts,
java.net.Proxy proxyServer,
java.util.List<Header> customHeaders) |
| Modifier and Type | Method and Description |
|---|---|
static DeliveryOptions.DeliveryOptionsBuilder |
builder() |
protected boolean |
canEqual(java.lang.Object other) |
boolean |
equals(java.lang.Object o) |
java.util.List<Header> |
getCustomHeaders()
Include custom request headers.
|
java.lang.String |
getPreviewApiKey()
The Preview API key configured with your Kontent.ai account.
|
java.lang.String |
getPreviewEndpoint()
The Preview endpoint address.
|
java.lang.String |
getProductionApiKey()
The Production API key (Secured access API key) configured with your Kontent.ai account.
|
java.lang.String |
getProductionEndpoint()
The Production endpoint address.
|
java.lang.String |
getProjectId()
The Project ID associated with your Kontent.ai account.
|
java.net.Proxy |
getProxyServer()
Sets the proxy server used by the http client.
|
int |
getRetryAttempts()
Sets the number of retry attempts the client should make when a request to the API fails.
|
int |
hashCode() |
boolean |
isUsePreviewApi()
This boolean flag determines if this client will use the preview API instead of the production API.
|
boolean |
isWaitForLoadingNewContent()
If the requested content has changed since the last request, the header determines whether to wait while fetching
content.
|
void |
setCustomHeaders(java.util.List<Header> customHeaders)
Include custom request headers.
|
void |
setPreviewApiKey(java.lang.String previewApiKey)
The Preview API key configured with your Kontent.ai account.
|
void |
setPreviewEndpoint(java.lang.String previewEndpoint)
The Preview endpoint address.
|
void |
setProductionApiKey(java.lang.String productionApiKey)
The Production API key (Secured access API key) configured with your Kontent.ai account.
|
void |
setProductionEndpoint(java.lang.String productionEndpoint)
The Production endpoint address.
|
void |
setProjectId(java.lang.String projectId)
The Project ID associated with your Kontent.ai account.
|
void |
setProxyServer(java.net.Proxy proxyServer)
Sets the proxy server used by the http client.
|
void |
setRetryAttempts(int retryAttempts)
Sets the number of retry attempts the client should make when a request to the API fails.
|
void |
setUsePreviewApi(boolean usePreviewApi)
This boolean flag determines if this client will use the preview API instead of the production API.
|
void |
setWaitForLoadingNewContent(boolean waitForLoadingNewContent)
If the requested content has changed since the last request, the header determines whether to wait while fetching
content.
|
java.lang.String |
toString() |
public DeliveryOptions(java.lang.String projectId)
DeliveryOptions using your Kontent.ai Project identifier.projectId - The Project ID associated with your Kontent.ai account. Must be in the format of an
UUID.public DeliveryOptions(java.lang.String projectId,
java.lang.String previewApiKey)
DeliveryOptions using your Kontent.ai Project identifier and using
the preview API.projectId - The Project ID associated with your Kontent.ai account. Must be in the format of an
UUID.previewApiKey - The Preview API key configured with your Kontent.ai account.public DeliveryOptions()
public DeliveryOptions(java.lang.String productionEndpoint,
java.lang.String previewEndpoint,
java.lang.String projectId,
java.lang.String productionApiKey,
java.lang.String previewApiKey,
boolean usePreviewApi,
boolean waitForLoadingNewContent,
int retryAttempts,
java.net.Proxy proxyServer,
java.util.List<Header> customHeaders)
public void setPreviewApiKey(java.lang.String previewApiKey)
previewApiKey - Sets the value of the preview API key in this DeliveryOptions instance. If not null,
automatically sets setUsePreviewApi(boolean) to 'true'.public static DeliveryOptions.DeliveryOptionsBuilder builder()
public java.lang.String getProductionEndpoint()
This defaults to "https://deliver.kontent.ai"
Formatterpublic java.lang.String getPreviewEndpoint()
This defaults to "https://assets-us-01.kc-usercontent.com/"
Formatterpublic java.lang.String getProjectId()
UUID.
UUID.public java.lang.String getProductionApiKey()
public java.lang.String getPreviewApiKey()
public boolean isUsePreviewApi()
public boolean isWaitForLoadingNewContent()
public int getRetryAttempts()
public java.net.Proxy getProxyServer()
Proxy.public java.util.List<Header> getCustomHeaders()
DeliveryClient.HEADER_ACCEPT, DeliveryClient.HEADER_AUTHORIZATION, DeliveryClient.HEADER_X_KC_SDK_ID, DeliveryClient.HEADER_X_KC_WAIT_FOR_LOADING_NEW_CONTENT will be ignored.public void setProductionEndpoint(java.lang.String productionEndpoint)
This defaults to "https://deliver.kontent.ai"
productionEndpoint - New value for the productionEndpoint in this DeliveryOptions instance.
Kontent.Formatterpublic void setPreviewEndpoint(java.lang.String previewEndpoint)
This defaults to "https://assets-us-01.kc-usercontent.com/"
previewEndpoint - New value for the productionEndpoint in this DeliveryOptions instance.Formatterpublic void setProjectId(java.lang.String projectId)
UUID.projectId - The Project ID associated with your Kontent.ai account. Must be in the format of an
UUID.public void setProductionApiKey(java.lang.String productionApiKey)
productionApiKey - Sets the value of the production API key (Secured access API key) in this DeliveryOptions instance.public void setUsePreviewApi(boolean usePreviewApi)
usePreviewApi - Whether the preview API should be used instead of the production API. Defaults to 'false'.
production API.public void setWaitForLoadingNewContent(boolean waitForLoadingNewContent)
waitForLoadingNewContent - New value for this DeliveryOptions instance.public void setRetryAttempts(int retryAttempts)
retryAttempts - New value for this DeliveryOptions instance.public void setProxyServer(java.net.Proxy proxyServer)
Proxy.proxyServer - The Proxy instance to use with the client each request.public void setCustomHeaders(java.util.List<Header> customHeaders)
DeliveryClient.HEADER_ACCEPT, DeliveryClient.HEADER_AUTHORIZATION, DeliveryClient.HEADER_X_KC_SDK_ID, DeliveryClient.HEADER_X_KC_WAIT_FOR_LOADING_NEW_CONTENT will be ignored.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object