Class HelpCenterUiConfig.Builder

  • Enclosing class:
    HelpCenterUiConfig


    public static class HelpCenterUiConfig.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 HelpCenterUiConfig.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 HelpCenterUiConfig.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 HelpCenterUiConfig.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 HelpCenterUiConfig.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 HelpCenterUiConfig.Builder withContactUsButtonVisible(boolean showContactUsButton)
        Define which screens the "ContactUs" Floating Action Button should be shown on.
        Parameters:
        showContactUsButton - Boolean value to determine where the contact button is visible
        Returns:
        The builder
      • withLabelNames

        public HelpCenterUiConfig.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 HelpCenterUiConfig.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
      • withCategoriesCollapsed

        public HelpCenterUiConfig.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 HelpCenterUiConfig.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
      • withDeflectionEnabled

        public HelpCenterUiConfig.Builder withDeflectionEnabled(boolean deflectionEnabled)
        Specifies whether a deflection mechanism should be shown (if one is present) when the contact us button is pressed. If this is false, the button press will navigate directly to the RequestActivity. If not specified, a default value of true is used.
        Parameters:
        deflectionEnabled - whether a deflection mechanism will be shown if present.
        Returns:
        The Builder
      • show

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

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

        public Intent intent(Context context,
                             UiConfig... uiConfigs)
        Creates an Intent for the HelpCenterActivity with the specified configuration options.
        Parameters:
        context - The Context which startActivity will be invoked on
        uiConfigs - 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<UiConfig> uiConfigs)
        Creates an Intent for the HelpCenterActivity with the specified configuration options.
        Parameters:
        context - The Context which startActivity will be invoked on
        uiConfigs - Configurations for Activities that can be started from HelpCenterActivity.
        Returns:
        An Intent for HelpCenterActivity with the specified configuration options
      • config

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