Class HelpCenterConfiguration.Builder

  • Enclosing class:
    HelpCenterConfiguration


    public static class HelpCenterConfiguration.Builder
    extends java.lang.Object
    This builder is used to generate the startup configuration for the Activity. Note that only one of the following may be specified. If you specify both, then the last to be specified is used:
    • withArticlesForCategoryIds
    • withArticlesForSectionIds
    • Method Detail

      • withArticlesForCategoryIds

        public HelpCenterConfiguration.Builder withArticlesForCategoryIds(java.lang.Long... categoryIds)
        Specifies a startup configuration which will show articles for a given set of category IDs
        Parameters:
        categoryIds - the category Ids to list articles for
        Returns:
        the builder
      • withArticlesForCategoryIds

        public HelpCenterConfiguration.Builder withArticlesForCategoryIds(java.util.List<java.lang.Long> categoryIds)
        Specifies a startup configuration which will show articles for a given set of category IDs
        Parameters:
        categoryIds - the category Ids to list articles for
        Returns:
        the builder
      • withArticlesForSectionIds

        public HelpCenterConfiguration.Builder withArticlesForSectionIds(java.lang.Long... sectionIds)
        Specifies a startup configuration which will show articles for a given set of section IDs
        Parameters:
        sectionIds - the section IDs to list articles for
        Returns:
        the builder
      • withArticlesForSectionIds

        public HelpCenterConfiguration.Builder withArticlesForSectionIds(java.util.List<java.lang.Long> sectionIds)
        Specifies a startup configuration which will show articles for a given set of section IDs
        Parameters:
        sectionIds - the section IDs to list articles for
        Returns:
        the builder
      • withContactUsButtonVisible

        public HelpCenterConfiguration.Builder withContactUsButtonVisible(boolean showContactUsButton)
        Define whether or not to display the "ContactUs" Floating Action Button.
        Parameters:
        showContactUsButton - Boolean value to determine whether the contact button is visible
        Returns:
        The Builder
      • withLabelNames

        public HelpCenterConfiguration.Builder withLabelNames(java.lang.String... labelNames)
        Specifies a startup configuration which will restrict the shown articles to ones that match the provided label names.
        Parameters:
        labelNames - the array of label names to which the Help Center will be restricted.
        Returns:
        The Builder
      • withLabelNames

        public HelpCenterConfiguration.Builder withLabelNames(java.util.List<java.lang.String> labelNames)
        Specifies a startup configuration which will restrict the shown articles to ones that match the provided label names.
        Parameters:
        labelNames - the array of label names to which the Help Center will be restricted.
        Returns:
        The Builder
      • withEngines

        public HelpCenterConfiguration.Builder withEngines(java.util.List<Engine> engines)
        Specifies a list of Engines to be used to drive a follow up conversation if the user presses the contact FAB. They will be passed to the MessagingActivity#builder()#withEngines(List) method. If no engines are provided, the user will be shown the RequestActivity instead.

        The button may be hidden using the HelpCenterConfiguration.Builder.withContactUsButtonVisible(boolean) method

        Parameters:
        engines - the List of Engines which will be used to start zendesk.classic.messaging.MessagingActivity
        Returns:
        The Builder
      • withEngines

        public HelpCenterConfiguration.Builder withEngines(Engine... engines)
        Specifies a list of Engines to be used to drive a follow up conversation if the user presses the contact FAB. They will be passed to the MessagingActivity#builder()#withEngines(List) method. If no engines are provided, the user will be shown the RequestActivity instead.

        The button may be hidden using the HelpCenterConfiguration.Builder.withContactUsButtonVisible(boolean) method

        Parameters:
        engines - the List of Engines which will be used to start zendesk.classic.messaging.MessagingActivity
        Returns:
        The Builder
      • withCategoriesCollapsed

        public HelpCenterConfiguration.Builder withCategoriesCollapsed(boolean categoriesCollapsed)
        Specifies whether or not to show all categories in the Help Center in their collapsed state when the content loads. If not specified, a default value of false is used.
        Parameters:
        categoriesCollapsed - true if the Help Center should initially show all categories in their collapsed state, false if categories should be shown in their expanded state, with sections and articles listed underneath.
        Returns:
        The Builder
      • withShowConversationsMenuButton

        public HelpCenterConfiguration.Builder withShowConversationsMenuButton(boolean showConversationsMenuButton)
        Client-side API to specify whether or not to show the conversations button in the Toolbar of the HelpCenterActivity. If not specified, a default value of true is used.

        The value is used in conjunction with the conversations settings from the server. If conversations are not enabled on the server, the value provided here will not be taken into account. Only if both values evaluate to true will the menu item will be shown in the Toolbar.

        Parameters:
        showConversationsMenuButton - true if the conversations menu item should be shown in the Toolbar, false if not.
        Returns:
        The Builder
      • show

        public void show(Context context,
                         Configuration... configurations)
        Starts the HelpCenterActivity.
        Parameters:
        context - The context which startActivity will be invoked on
        configurations - Configurations for Activities that can be started from HelpCenterActivity.
      • show

        public void show(Context context,
                         java.util.List<Configuration> configurations)
        Starts the HelpCenterActivity.
        Parameters:
        context - The context which startActivity will be invoked on
        configurations - Configurations for Activities that can be started from HelpCenterActivity.
      • intent

        public Intent intent(Context context,
                             Configuration... configurations)
        Creates an Intent for the HelpCenterActivity with the specified configuration options.
        Parameters:
        context - The Context which startActivity will be invoked on
        configurations - Configurations for Activities that can be started from HelpCenterActivity.
        Returns:
        An Intent for HelpCenterActivity with the specified configuration options
      • intent

        public Intent intent(Context context,
                             java.util.List<Configuration> configurations)
        Creates an Intent for the HelpCenterActivity with the specified configuration options.
        Parameters:
        context - The Context which startActivity will be invoked on
        configurations - Configurations for Activities that can be started from HelpCenterActivity.
        Returns:
        An Intent for HelpCenterActivity with the specified configuration options
      • config

        public Configuration config()
        Create a Configuration for the passed in configuration options.