Package zendesk.support.guide
Class HelpCenterUiConfig.Builder
- java.lang.Object
-
- zendesk.support.guide.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
-
-
Constructor Summary
Constructors Constructor and Description Builder()
Creates a new Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description UiConfig
config()
Create aUiConfig
for the passed in configuration options.Intent
intent(Context context, java.util.List<UiConfig> uiConfigs)
Creates anIntent
for theHelpCenterActivity
with the specified configuration options.Intent
intent(Context context, UiConfig... uiConfigs)
Creates anIntent
for theHelpCenterActivity
with the specified configuration options.void
show(Context context, java.util.List<UiConfig> uiConfigs)
Starts theHelpCenterActivity
.void
show(Context context, UiConfig... uiConfigs)
Starts theHelpCenterActivity
.HelpCenterUiConfig.Builder
withArticlesForCategoryIds(java.util.List<java.lang.Long> categoryIds)
Specifies a startup configuration which will show articles for a given set of category IDsHelpCenterUiConfig.Builder
withArticlesForCategoryIds(java.lang.Long... categoryIds)
Specifies a startup configuration which will show articles for a given set of category IDsHelpCenterUiConfig.Builder
withArticlesForSectionIds(java.util.List<java.lang.Long> sectionIds)
Specifies a startup configuration which will show articles for a given set of section IDsHelpCenterUiConfig.Builder
withArticlesForSectionIds(java.lang.Long... sectionIds)
Specifies a startup configuration which will show articles for a given set of section IDsHelpCenterUiConfig.Builder
withCategoriesCollapsed(boolean categoriesCollapsed)
Specifies whether or not to show all categories in the Help Center in their collapsed state when the content loads.HelpCenterUiConfig.Builder
withContactUsButtonVisible(boolean showContactUsButton)
Define which screens the "ContactUs" Floating Action Button should be shown on.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.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.HelpCenterUiConfig.Builder
withShowConversationsMenuButton(boolean showConversationsMenuButton)
Client-side API to specify whether or not to show the conversations button in the Toolbar of theHelpCenterActivity
.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a new Builder. CallHelpCenterUiConfig.Builder.show(Context, UiConfig...)
orHelpCenterUiConfig.Builder.show(Context, List)
to start the Activity
-
-
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 theHelpCenterActivity
. If not specified, a default value oftrue
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 totrue
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, UiConfig... uiConfigs)
Starts theHelpCenterActivity
.- Parameters:
context
- The context whichstartActivity
will be invoked onuiConfigs
- Configurations for Activities that can be started from HelpCenterActivity.
-
show
public void show(Context context, java.util.List<UiConfig> uiConfigs)
Starts theHelpCenterActivity
.- Parameters:
context
- The context whichstartActivity
will be invoked onuiConfigs
- Configurations for Activities that can be started from HelpCenterActivity.
-
intent
public Intent intent(Context context, UiConfig... uiConfigs)
Creates anIntent
for theHelpCenterActivity
with the specified configuration options.- Parameters:
context
- TheContext
whichstartActivity
will be invoked onuiConfigs
- Configurations for Activities that can be started from HelpCenterActivity.- Returns:
- An
Intent
forHelpCenterActivity
with the specified configuration options
-
intent
public Intent intent(Context context, java.util.List<UiConfig> uiConfigs)
Creates anIntent
for theHelpCenterActivity
with the specified configuration options.- Parameters:
context
- TheContext
whichstartActivity
will be invoked onuiConfigs
- Configurations for Activities that can be started from HelpCenterActivity.- Returns:
- An
Intent
forHelpCenterActivity
with the specified configuration options
-
config
public UiConfig config()
Create aUiConfig
for the passed in configuration options.
-
-