Package com.zendesk.sdk.network.impl
Class ApplicationScope
- java.lang.Object
-
- com.zendesk.sdk.network.impl.ApplicationScope
-
public class ApplicationScope extends java.lang.ObjectRepresentation of one configured SDK instance. Holding all the state and configurations.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetAppId()Gets the Zendesk Application Id asStringof the recent SDK configuration.ContextgetApplicationContext()Gets the applicationContextof the recent application instance.java.util.List<CustomField>getCustomFields()Get the configured Custom Fields asListofCustomField.ScopeCache<LibraryModule>getLibraryModuleCache()java.util.LocalegetLocale()Get the configuredLocaleof the recent SDK configuration.java.lang.StringgetOAuthToken()Gets the Zendesk OAuth Token asStringof the recent SDK configuration.ScopeCache<RestAdapterModule>getRestAdapterCache()SdkOptionsgetSdkOptions()Return the configuredSdkOptionsof the recent SDK configuration.ScopeCache<StorageModule>getStorageModuleCache()java.lang.LonggetTicketFormId()Get the configured Ticket Form Id asLongof the recent SDK configuration.java.lang.StringgetUrl()Gets the Zendesk Url asStringof the recent SDK configuration.java.lang.StringgetUserAgentHeader()Get the configured User-Agent header asStringof the recent SDK configuration.booleanisCoppaEnabled()Return if COPPA is enabled of the recent SDK configuration.booleanisDevelopmentMode()Return if SDK is used in a production build or development build.com.zendesk.sdk.network.impl.ApplicationScope.BuildernewBuilder()Returns newly createdBuilderwith the already configured options.
-
-
-
Method Detail
-
getApplicationContext
public Context getApplicationContext()
Gets the applicationContextof the recent application instance.- Returns:
- an application
Context
-
getUrl
public java.lang.String getUrl()
Gets the Zendesk Url asStringof the recent SDK configuration.- Returns:
- the Zendesk Url as
String
-
getAppId
public java.lang.String getAppId()
Gets the Zendesk Application Id asStringof the recent SDK configuration.- Returns:
- the Zendesk Application Id as
String
-
getOAuthToken
public java.lang.String getOAuthToken()
Gets the Zendesk OAuth Token asStringof the recent SDK configuration.- Returns:
- the Zendesk OAuth Token as
String
-
getLocale
public java.util.Locale getLocale()
Get the configuredLocaleof the recent SDK configuration.
If no value was setLocale.getDefault()will be used.- Returns:
- the used
Locale
-
isCoppaEnabled
public boolean isCoppaEnabled()
Return if COPPA is enabled of the recent SDK configuration.
If no value was set,falsewill be returned.- Returns:
trueif COPPA is enabledfalseif not
-
isDevelopmentMode
public boolean isDevelopmentMode()
Return if SDK is used in a production build or development build. There is a lot of voodoo going on, it's trying its best to detect the right stage.- Returns:
trueif SDK is used in development buildfalseif used in production build
-
getSdkOptions
public SdkOptions getSdkOptions()
Return the configuredSdkOptionsof the recent SDK configuration.
If nothing was setDefaultSdkOptionswill be returned.- Returns:
- the configured
SdkOptions
-
getTicketFormId
public java.lang.Long getTicketFormId()
Get the configured Ticket Form Id asLongof the recent SDK configuration.
If nothing was setnullwill be returned.- Returns:
- the configured Ticket Form Id as
Long
-
getCustomFields
public java.util.List<CustomField> getCustomFields()
Get the configured Custom Fields asListofCustomField.
If nothing was configured, an emptyListwill be returned.- Returns:
- a
ListofCustomField
-
getUserAgentHeader
public java.lang.String getUserAgentHeader()
Get the configured User-Agent header asStringof the recent SDK configuration.- Returns:
- the user-agent as a
String
-
newBuilder
public com.zendesk.sdk.network.impl.ApplicationScope.Builder newBuilder()
Returns newly createdBuilderwith the already configured options.- Returns:
- a new
Builder
-
getLibraryModuleCache
public ScopeCache<LibraryModule> getLibraryModuleCache()
-
getRestAdapterCache
public ScopeCache<RestAdapterModule> getRestAdapterCache()
-
getStorageModuleCache
public ScopeCache<StorageModule> getStorageModuleCache()
-
-