Package zendesk.support.guide
Class ArticleConfiguration.Builder
- java.lang.Object
-
- zendesk.support.guide.ArticleConfiguration.Builder
-
- Enclosing class:
- ArticleConfiguration
public static class ArticleConfiguration.Builder extends java.lang.Object
This builder is used to generate an instance ofArticleConfiguration
-
-
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)
Create anIntent
to start theViewArticleActivity
with the specified configuration options.Intent
intent(Context context, java.util.List<Configuration> configurations)
Create anIntent
to start theViewArticleActivity
with the specified configuration options.void
show(Context context, Configuration... configurations)
Shows the activity.void
show(Context context, java.util.List<Configuration> configurations)
Shows the activity.ArticleConfiguration.Builder
withContactUsButtonVisible(boolean contactUsVisible)
Define which screens the "ContactUs" Floating Action Button should be shown on.ArticleConfiguration.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.ArticleConfiguration.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.
-
-
-
Constructor Detail
-
Builder
public Builder(long articleId)
Constructs an instance from the given articleId and title- Parameters:
articleId
- The ID of the article you want to display
-
Builder
public Builder(Article article)
Constructs an instance from the given article model- Parameters:
article
- The article that you want to display
-
Builder
public Builder()
Constructs an instance with a blank configuration
-
-
Method Detail
-
withContactUsButtonVisible
public ArticleConfiguration.Builder withContactUsButtonVisible(boolean contactUsVisible)
Define which screens the "ContactUs" Floating Action Button should be shown on.- Parameters:
contactUsVisible
- Boolean value to determine where the contact button is visible
-
withEngines
public ArticleConfiguration.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
ArticleConfiguration.Builder.withContactUsButtonVisible(boolean)
method- Parameters:
engines
- the List of Engines which will be used to startzendesk.messaging.MessagingActivity
- Returns:
- The Builder
-
withEngines
public ArticleConfiguration.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
ArticleConfiguration.Builder.withContactUsButtonVisible(boolean)
method- Parameters:
engines
- the List of Engines which will be used to startzendesk.messaging.MessagingActivity
- Returns:
- The Builder
-
show
public void show(Context context, Configuration... configurations)
Shows the activity.- Parameters:
context
- The context whichstartActivity
will be invoked onconfigurations
- Configurations for Activities that can be started from ViewArticleActivity.
-
show
public void show(Context context, java.util.List<Configuration> configurations)
Shows the activity.- Parameters:
context
- The context whichstartActivity
will be invoked onconfigurations
- Configurations for Activities that can be started from ViewArticleActivity.
-
intent
public Intent intent(Context context, Configuration... configurations)
Create anIntent
to start theViewArticleActivity
with the specified configuration options.- Parameters:
context
- The context whichstartActivity
will be invoked onconfigurations
- Configurations for Activities that can be started from ViewArticleActivity.- Returns:
- an Intent for
ViewArticleActivity
with the specified configuration options
-
intent
public Intent intent(Context context, java.util.List<Configuration> configurations)
Create anIntent
to start theViewArticleActivity
with the specified configuration options.- Parameters:
context
- The context whichstartActivity
will be invoked onconfigurations
- Configurations for Activities that can be started from ViewArticleActivity.- Returns:
- an Intent for
ViewArticleActivity
with the specified configuration options
-
config
public Configuration config()
Create aConfiguration
for the passed in configuration options.
-
-