Package zendesk.core
Enum Zendesk
- java.lang.Object
-
- java.lang.Enum<Zendesk>
-
- zendesk.core.Zendesk
-
-
Enum Constant Summary
Enum Constants Enum Constant and Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description CoreModule
coreModule()
For internal use.void
init(Context context, java.lang.String zendeskUrl, java.lang.String applicationId, java.lang.String oauthClientId, Identity identity)
Initialises the Zendesk Core SDK with your Zendesk subdomain settings and anIdentity
.boolean
isInitialized()
Gets whetherZendesk.init(Context, String, String, String, Identity)
was called with valid values or not.void
overwriteIdentity(Identity identity)
Overwrites the current identity which the SDK uses to access and create resources, at runtime, if theIdentity
provided inZendesk.init(Context, String, String, String, Identity)
(or the last timeoverwriteIdentity(Identity)
was called) is no longer the desired user identity.ProviderStore
provider()
Gets aProviderStore
for accessing all available SDK Providers.static Zendesk
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Zendesk[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final Zendesk INSTANCE
-
-
Method Detail
-
values
public static Zendesk[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Zendesk c : Zendesk.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Zendesk valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
init
public void init(Context context, java.lang.String zendeskUrl, java.lang.String applicationId, java.lang.String oauthClientId, Identity identity)
Initialises the Zendesk Core SDK with your Zendesk subdomain settings and anIdentity
.This requires some authentication settings. Your zendeskUrl must be your full Zendesk URL in the form of https://{subdomain.zendesk.com You should replace {subdomain} with your own subdomain.
This method is idempotent; calling it more than once with the same values will have no effect. If called with any changed values, it will result in fresh instances of all providers being created. Any references to providers previously obtained from the
ProviderStore
viaZendesk.provider()
should be discarded and re-obtained.- Parameters:
context
- A context, used for initialising stored settingszendeskUrl
- The full URL of your Zendesk instance, https://{subdomain}.zendesk.comapplicationId
- The application id of your SDK app, as found in the web interfaceoauthClientId
- The oauth client id that was supplied when you set up oauth in the web interfaceidentity
- Identity that the SDK will identify as- Throws:
java.lang.IllegalArgumentException
- if context is null, the zendeskUrl is invalid or if the application or client id is not supplied.
-
isInitialized
public boolean isInitialized()
Gets whetherZendesk.init(Context, String, String, String, Identity)
was called with valid values or not.- Returns:
- true if init was successfully called, false otherwise.
-
overwriteIdentity
public void overwriteIdentity(Identity identity)
Overwrites the current identity which the SDK uses to access and create resources, at runtime, if theIdentity
provided inZendesk.init(Context, String, String, String, Identity)
(or the last timeoverwriteIdentity(Identity)
was called) is no longer the desired user identity. It rebuilds a fresh instance of all providers, so any references to providers which had been previously obtained, typically via through the methods ofZendesk.provider()
, should be re-obtained after calling this method.- Parameters:
identity
- Identity that the SDK will identify as
-
provider
public ProviderStore provider()
Gets aProviderStore
for accessing all available SDK Providers.- Returns:
- an instance of
ProviderStore
-
coreModule
public CoreModule coreModule()
For internal use.
Here be dragons
-
-