java.lang.Object | |
↳ | com.salesforce.android.knowledge.core.KnowledgeConfiguration.Builder |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
KnowledgeConfiguration |
build()
Build the
KnowledgeConfiguration instance. | ||||||||||
KnowledgeConfiguration.Builder |
fallbackLocale(Locale locale)
Sets the fallback locale to use if articles cannot be retrieved using the initial locale.
| ||||||||||
KnowledgeConfiguration.Builder |
initialLocale(Locale locale)
Set the initial language to try when fetching articles.
| ||||||||||
KnowledgeConfiguration.Builder |
offlineResourceConfig(OfflineResourceConfig config)
See the configuration for how resources (e.g.
| ||||||||||
KnowledgeConfiguration.Builder |
withAuthConfig(AuthTokenProvider tokenProvider, AuthenticatedUser user)
Sets the AuthConfiguration and AuthenticatedUser to be used for requesting access tokens.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Build the KnowledgeConfiguration
instance.
configure(KnowledgeConfiguration)
.
Sets the fallback locale to use if articles cannot be retrieved using the initial locale. Generally this will occur if the user's device has a valid language (ie: one supported by Salesforce) but your organization has not supplied articles in that language. When this occurs, articles will be retrieved in this fallback locale instead.
Defaults to en-US
if not set.
A language is supported if it is fully supported by salesforce AND has been enabled in the knowledge base.
For a list of languages that may be enabled See Salesforce's fully supported languages.
Applications should use isValidSfdcLocale(Locale)
to check if a Locale contains a valid support language prior to calling this method.
locale | The locale to use if initialLocal is not enabled on the org. |
---|
IllegalArgumentException | if the language is not fully supported by salesforce. |
---|
Set the initial language to try when fetching articles. The default is to use the device locale if it
is a supported language, and to use en-US
otherwise. You can check
Salesforce's fully supported languages
for a list of valid languages. Applications should use isValidSfdcLocale(Locale)
to check if a Locale contains a valid support language prior to calling this method.
If articles cannot be retrieved using the given locale, the fallbackLocale(Locale)
will be used instead.
locale | The locale to use when fetching article contents. |
---|
IllegalArgumentException | if the language is not fully supported by salesforce. |
---|
See the configuration for how resources (e.g. images in article contents) should be cached
for offline viewing. The default configuration is to disable resource caching. See the
OfflineResourceConfig
documentation for more information on the available
configuration options.
config | The configuration for offline resource caching. |
---|
Sets the AuthConfiguration and AuthenticatedUser to be used for requesting access tokens. If not set the SDK will make all requests as a guest user.
All data retrieved will be encrypted and cached locally.
It is the applications responsibility to delete the cache once the user is logged out or the data is no longer needed.
This can be done by deleteCacheForUser(Context, AuthenticatedUser)
} or clearCacheForUser(Context, AuthenticatedUser)
tokenProvider | The AuthTokenProvider used to get tokens for authenticated access. |
---|---|
user | The AuthenticatedUser used to store offline data. |