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.
    • 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 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,
                         Identity identity)
        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.

        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
        identity - 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.
      • overwriteIdentity

        public void overwriteIdentity(Identity identity)
        Overwrites the current identity which the SDK uses to access and create resources, at runtime, if the Identity provided in Zendesk.init(Context, String, String, String, Identity) (or the last time overwriteIdentity(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 of Zendesk.provider(), should be re-obtained after calling this method.
        Parameters:
        identity - Identity that the SDK will identify as
      • coreModule

        public CoreModule coreModule()
        For internal use.
        Here be dragons