Package zendesk.core

Enum Zendesk

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Zendesk>


    public enum Zendesk
    extends java.lang.Enum<Zendesk>
    Configuration class for Zendesk Core SDK initialization. Call this first to configure Zendesk to use the correct credentials and Zendesk URL.
    • 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 name
        java.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)
        Initialises the Zendesk Core SDK with your Zendesk subdomain settings and an Identity.

        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 via Zendesk.provider() should be discarded and re-obtained.

        Before the SDK can used a valid Identity ust be set using the Zendesk.setIdentity(Identity) method.

        Parameters:
        context - A context, used for initialising stored settings
        zendeskUrl - The full URL of your Zendesk instance, https://{subdomain}.zendesk.com
        applicationId - The application id of your SDK app, as found in the web interface
        oauthClientId - The oauth client id that was supplied when you set up oauth in the web interface
      • setIdentity

        public void setIdentity(Identity identity)
        Set the Identity for the SDK. If there is a previously stored Identity and this sets different Identity any user data will be wiped from the SDK.

        identity This can be set multiple times with different valid identities

      • getIdentity

        public Identity getIdentity()
        Return the current Identity for the SDK, or null if none has been set.
        Returns:
        the current Identity, or null if none has been set.