Class RequestConfiguration.Builder
- java.lang.Object
-
- zendesk.support.request.RequestConfiguration.Builder
-
- Enclosing class:
- RequestConfiguration
public static class RequestConfiguration.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description 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
deepLinkIntent(Context context, Intent... backStackActivities)
Creates and returns anIntent
for starting aDeepLinkingBroadcastReceiver
, for deep-linking to aRequestActivity
.Intent
deepLinkIntent(Context context, java.util.List<Configuration> configurations, Intent... backStackActivities)
Creates and returns anIntent
for starting aDeepLinkingBroadcastReceiver
, for deep-linking to aRequestActivity
.Intent
intent(Context context, Configuration... configurations)
Create anIntent
to start theRequestActivity
with the specified configuration options.Intent
intent(Context context, java.util.List<Configuration> configurations)
Create anIntent
to start theRequestActivity
with the specified configuration options.void
show(Context context, Configuration... configurations)
DisplayRequestActivity
to the user.void
show(Context context, java.util.List<Configuration> configurations)
DisplayRequestActivity
to the user.RequestConfiguration.Builder
withCustomFields(java.util.List<CustomField> customFields)
Attach a custom field form to the request.RequestConfiguration.Builder
withFiles(java.io.File... files)
SpecifyFile
objects to be selected as an attachment to any requests created using thisRequestConfiguration
.RequestConfiguration.Builder
withFiles(java.util.List<java.io.File> files)
Specify a list ofFile
objects to be selected as attachments to any requests created using thisRequestConfiguration
.RequestConfiguration.Builder
withRequest(Request request)
Show an existing request.RequestConfiguration.Builder
withRequestId(java.lang.String id)
Show an existing request.RequestConfiguration.Builder
withRequestInfo(RequestInfo requestInfo)
RequestConfiguration.Builder
withRequestSubject(java.lang.String requestSubject)
Attach request subject to the created requestRequestConfiguration.Builder
withTags(java.util.List<java.lang.String> tags)
Attach tags to the created request.RequestConfiguration.Builder
withTags(java.lang.String... tags)
Attach tags to the created request.RequestConfiguration.Builder
withTicketForm(long ticketFormId, java.util.List<CustomField> customFields)
Attach a ticket form to the request.
-
-
-
Method Detail
-
withRequestSubject
public RequestConfiguration.Builder withRequestSubject(java.lang.String requestSubject)
Attach request subject to the created requestThis information is only used for new requests.
-
withTags
public RequestConfiguration.Builder withTags(java.lang.String... tags)
Attach tags to the created request.This information is only used for new requests.
-
withTags
public RequestConfiguration.Builder withTags(java.util.List<java.lang.String> tags)
Attach tags to the created request.This information is only used for new requests.
-
withRequestId
public RequestConfiguration.Builder withRequestId(java.lang.String id)
Show an existing request.
-
withTicketForm
public RequestConfiguration.Builder withTicketForm(long ticketFormId, java.util.List<CustomField> customFields)
Attach a ticket form to the request.This information is only used for new requests.
-
withFiles
public RequestConfiguration.Builder withFiles(java.util.List<java.io.File> files)
Specify a list ofFile
objects to be selected as attachments to any requests created using thisRequestConfiguration
.Note that this will use the
UploadProvider
to attach any files, effectively treating them the same way as any files selected by the user. This means that they will show as selected files when the user opens the attachments view before creating the request (and therefore the user can de-select them), and also they will show as attachments on the request after it has been created, fully visible to the user.- Parameters:
files
- the files to attach to any new requests- Returns:
- the builder
-
withFiles
public RequestConfiguration.Builder withFiles(java.io.File... files)
SpecifyFile
objects to be selected as an attachment to any requests created using thisRequestConfiguration
.Note that this will use the
UploadProvider
to attach any files, effectively treating them the same way as any files selected by the user. This means that they will show as selected files when the user opens the attachments view before creating the request (and therefore the user can de-select them), and also they will show as attachments on the request after it has been created, fully visible to the user.- Parameters:
files
- the files to attach to any new requests- Returns:
- the builder
-
withCustomFields
public RequestConfiguration.Builder withCustomFields(java.util.List<CustomField> customFields)
Attach a custom field form to the request.This information is only used for new requests.
-
withRequest
public RequestConfiguration.Builder withRequest(Request request)
Show an existing request.
-
withRequestInfo
public RequestConfiguration.Builder withRequestInfo(RequestInfo requestInfo)
-
show
public void show(Context context, Configuration... configurations)
DisplayRequestActivity
to the user.- Parameters:
context
- a validContext
configurations
- Configurations for screen that can be started from RequestActivity.
-
show
public void show(Context context, java.util.List<Configuration> configurations)
DisplayRequestActivity
to the user.- Parameters:
context
- a validContext
configurations
- Configurations for screen that can be started from RequestActivity.
-
config
public Configuration config()
Create aConfiguration
for the passed in configuration options.
-
intent
public Intent intent(Context context, Configuration... configurations)
Create anIntent
to start theRequestActivity
with the specified configuration options.- Parameters:
context
- The context whichstartActivity
will be invoked onconfigurations
- Configurations for screen that can be started from RequestActivity.- Returns:
- An
Intent
forRequestActivity
with the specified configuration options
-
intent
public Intent intent(Context context, java.util.List<Configuration> configurations)
Create anIntent
to start theRequestActivity
with the specified configuration options.- Parameters:
context
- The context whichstartActivity
will be invoked onconfigurations
- Configurations for screen that can be started from RequestActivity.- Returns:
- An
Intent
forRequestActivity
with the specified configuration options
-
deepLinkIntent
public Intent deepLinkIntent(Context context, Intent... backStackActivities)
Creates and returns anIntent
for starting aDeepLinkingBroadcastReceiver
, for deep-linking to aRequestActivity
.The returned Intent is intended to be wrapped in a
android.app.PendingIntent
and set on a Notification (usingandroidx.core.app.NotificationCompat.Builder#setContentIntent(PendingIntent)
).- Parameters:
context
- the application contextbackStackActivities
- an optional list ofIntent
s for a backstack of Activities to start- Returns:
- an Intent for this BroadcastReceiver
-
deepLinkIntent
public Intent deepLinkIntent(Context context, java.util.List<Configuration> configurations, Intent... backStackActivities)
Creates and returns anIntent
for starting aDeepLinkingBroadcastReceiver
, for deep-linking to aRequestActivity
.The returned Intent is intended to be wrapped in a
android.app.PendingIntent
and set on a Notification (usingandroidx.core.app.NotificationCompat.Builder#setContentIntent(PendingIntent)
).- Parameters:
context
- the application contextconfigurations
- Configurations for screen that can be started from RequestActivity.backStackActivities
- an optional list ofIntent
s for a backstack of Activities to start- Returns:
- an Intent for this BroadcastReceiver
-
-