Package zendesk.support.guide
Class HelpCenterConfiguration.Builder
- java.lang.Object
-
- zendesk.support.guide.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
-
-
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 Configuration
config()
Create aConfiguration
for the passed in configuration options.Intent
intent(Context context, Configuration... configurations)
Creates anIntent
for theHelpCenterActivity
with the specified configuration options.Intent
intent(Context context, java.util.List<Configuration> configurations)
Creates anIntent
for theHelpCenterActivity
with the specified configuration options.void
show(Context context, Configuration... configurations)
Starts theHelpCenterActivity
.void
show(Context context, java.util.List<Configuration> configurations)
Starts theHelpCenterActivity
.HelpCenterConfiguration.Builder
withArticlesForCategoryIds(java.util.List<java.lang.Long> categoryIds)
Specifies a startup configuration which will show articles for a given set of category IDsHelpCenterConfiguration.Builder
withArticlesForCategoryIds(java.lang.Long... categoryIds)
Specifies a startup configuration which will show articles for a given set of category IDsHelpCenterConfiguration.Builder
withArticlesForSectionIds(java.util.List<java.lang.Long> sectionIds)
Specifies a startup configuration which will show articles for a given set of section IDsHelpCenterConfiguration.Builder
withArticlesForSectionIds(java.lang.Long... sectionIds)
Specifies a startup configuration which will show articles for a given set of section IDsHelpCenterConfiguration.Builder
withCategoriesCollapsed(boolean categoriesCollapsed)
Specifies whether or not to show all categories in the Help Center in their collapsed state when the content loads.HelpCenterConfiguration.Builder
withContactUsButtonVisible(boolean showContactUsButton)
Define whether or not to display the "ContactUs" Floating Action Button.HelpCenterConfiguration.Builder
withEngines(Engine... engines)
Specifies a list ofEngine
s to be used to drive a follow up conversation if the user presses the contact FAB.HelpCenterConfiguration.Builder
withEngines(java.util.List<Engine> engines)
Specifies a list ofEngine
s to be used to drive a follow up conversation if the user presses the contact FAB.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.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.HelpCenterConfiguration.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. CallHelpCenterConfiguration.Builder.show(Context, Configuration...)
orHelpCenterConfiguration.Builder.show(Context, List)
to start the Activity
-
-
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 ofEngine
s to be used to drive a follow up conversation if the user presses the contact FAB. They will be passed to theMessagingActivity#builder()#withEngines(List)
method. If no engines are provided, the user will be shown theRequestActivity
instead.The button may be hidden using the
HelpCenterConfiguration.Builder.withContactUsButtonVisible(boolean)
method- Parameters:
engines
- the List of Engines which will be used to startzendesk.classic.messaging.MessagingActivity
- Returns:
- The Builder
-
withEngines
public HelpCenterConfiguration.Builder withEngines(Engine... engines)
Specifies a list ofEngine
s to be used to drive a follow up conversation if the user presses the contact FAB. They will be passed to theMessagingActivity#builder()#withEngines(List)
method. If no engines are provided, the user will be shown theRequestActivity
instead.The button may be hidden using the
HelpCenterConfiguration.Builder.withContactUsButtonVisible(boolean)
method- Parameters:
engines
- the List of Engines which will be used to startzendesk.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 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 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 theHelpCenterActivity
.- Parameters:
context
- The context whichstartActivity
will be invoked onconfigurations
- Configurations for Activities that can be started from HelpCenterActivity.
-
show
public void show(Context context, java.util.List<Configuration> configurations)
Starts theHelpCenterActivity
.- Parameters:
context
- The context whichstartActivity
will be invoked onconfigurations
- Configurations for Activities that can be started from HelpCenterActivity.
-
intent
public Intent intent(Context context, Configuration... configurations)
Creates anIntent
for theHelpCenterActivity
with the specified configuration options.- Parameters:
context
- TheContext
whichstartActivity
will be invoked onconfigurations
- 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<Configuration> configurations)
Creates anIntent
for theHelpCenterActivity
with the specified configuration options.- Parameters:
context
- TheContext
whichstartActivity
will be invoked onconfigurations
- Configurations for Activities that can be started from HelpCenterActivity.- Returns:
- An
Intent
forHelpCenterActivity
with the specified configuration options
-
config
public Configuration config()
Create aConfiguration
for the passed in configuration options.
-
-