Package zendesk.support.request
Class RequestUiConfig.Builder
- java.lang.Object
-
- zendesk.support.request.RequestUiConfig.Builder
-
- Enclosing class:
- RequestUiConfig
public static class RequestUiConfig.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 UiConfig
config()
Create aUiConfig
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<UiConfig> uiConfigs, Intent... backStackActivities)
Creates and returns anIntent
for starting aDeepLinkingBroadcastReceiver
, for deep-linking to aRequestActivity
.Intent
intent(Context context, java.util.List<UiConfig> uiConfigs)
Create anIntent
to start theRequestActivity
with the specified configuration options.Intent
intent(Context context, UiConfig... uiConfigs)
Create anIntent
to start theRequestActivity
with the specified configuration options.void
show(Context context, java.util.List<UiConfig> uiConfigs)
DisplayRequestActivity
to the user.void
show(Context context, UiConfig... uiConfigs)
DisplayRequestActivity
to the user.RequestUiConfig.Builder
withCustomFields(java.util.List<CustomField> customFields)
Attach a custom field form to the request.RequestUiConfig.Builder
withFiles(java.io.File... files)
SpecifyFile
objects to be selected as an attachment to any requests created using thisRequestUiConfig
.RequestUiConfig.Builder
withFiles(java.util.List<java.io.File> files)
Specify a list ofFile
objects to be selected as attachments to any requests created using thisRequestUiConfig
.RequestUiConfig.Builder
withRequest(Request request)
Show an existing request.RequestUiConfig.Builder
withRequestId(java.lang.String id)
Show an existing request.RequestUiConfig.Builder
withRequestInfo(RequestInfo requestInfo)
RequestUiConfig.Builder
withRequestSubject(java.lang.String requestSubject)
Attach request subject to the created requestRequestUiConfig.Builder
withTags(java.util.List<java.lang.String> tags)
Attach tags to the created request.RequestUiConfig.Builder
withTags(java.lang.String... tags)
Attach tags to the created request.RequestUiConfig.Builder
withTicketForm(long ticketFormId, java.util.List<CustomField> customFields)
Attach a ticket form to the request.
-
-
-
Method Detail
-
withRequestSubject
public RequestUiConfig.Builder withRequestSubject(java.lang.String requestSubject)
Attach request subject to the created requestThis information is only used for new requests.
-
withTags
public RequestUiConfig.Builder withTags(java.lang.String... tags)
Attach tags to the created request.This information is only used for new requests.
-
withTags
public RequestUiConfig.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 RequestUiConfig.Builder withRequestId(java.lang.String id)
Show an existing request.
-
withTicketForm
public RequestUiConfig.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 RequestUiConfig.Builder withFiles(java.util.List<java.io.File> files)
Specify a list ofFile
objects to be selected as attachments to any requests created using thisRequestUiConfig
. Note that this will use theUploadProvider
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 RequestUiConfig.Builder withFiles(java.io.File... files)
SpecifyFile
objects to be selected as an attachment to any requests created using thisRequestUiConfig
. Note that this will use theUploadProvider
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 RequestUiConfig.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 RequestUiConfig.Builder withRequest(Request request)
Show an existing request.
-
withRequestInfo
public RequestUiConfig.Builder withRequestInfo(RequestInfo requestInfo)
-
show
public void show(Context context, UiConfig... uiConfigs)
DisplayRequestActivity
to the user.- Parameters:
context
- a validContext
uiConfigs
- Configurations for screen that can be started from RequestActivity.
-
show
public void show(Context context, java.util.List<UiConfig> uiConfigs)
DisplayRequestActivity
to the user.- Parameters:
context
- a validContext
uiConfigs
- Configurations for screen that can be started from RequestActivity.
-
intent
public Intent intent(Context context, UiConfig... uiConfigs)
Create anIntent
to start theRequestActivity
with the specified configuration options.- Parameters:
context
- The context whichstartActivity
will be invoked onuiConfigs
- 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<UiConfig> uiConfigs)
Create anIntent
to start theRequestActivity
with the specified configuration options.- Parameters:
context
- The context whichstartActivity
will be invoked onuiConfigs
- 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 aandroid.app.PendingIntent
and set on a Notification (usingandroid.support.v4.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<UiConfig> uiConfigs, Intent... backStackActivities)
Creates and returns anIntent
for starting aDeepLinkingBroadcastReceiver
, for deep-linking to aRequestActivity
. The returned Intent is intended to be wrapped in aandroid.app.PendingIntent
and set on a Notification (usingandroid.support.v4.app.NotificationCompat.Builder#setContentIntent(PendingIntent)
).- Parameters:
context
- the application contextuiConfigs
- 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
-
-