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 Configurationconfig()Create aConfigurationfor the passed in configuration options.IntentdeepLinkIntent(Context context, Intent... backStackActivities)Creates and returns anIntentfor starting aDeepLinkingBroadcastReceiver, for deep-linking to aRequestActivity.IntentdeepLinkIntent(Context context, java.util.List<Configuration> configurations, Intent... backStackActivities)Creates and returns anIntentfor starting aDeepLinkingBroadcastReceiver, for deep-linking to aRequestActivity.Intentintent(Context context, Configuration... configurations)Create anIntentto start theRequestActivitywith the specified configuration options.Intentintent(Context context, java.util.List<Configuration> configurations)Create anIntentto start theRequestActivitywith the specified configuration options.voidshow(Context context, Configuration... configurations)DisplayRequestActivityto the user.voidshow(Context context, java.util.List<Configuration> configurations)DisplayRequestActivityto the user.RequestConfiguration.BuilderwithCustomFields(java.util.List<CustomField> customFields)Attach a custom field form to the request.RequestConfiguration.BuilderwithFiles(java.io.File... files)SpecifyFileobjects to be selected as an attachment to any requests created using thisRequestConfiguration.RequestConfiguration.BuilderwithFiles(java.util.List<java.io.File> files)Specify a list ofFileobjects to be selected as attachments to any requests created using thisRequestConfiguration.RequestConfiguration.BuilderwithRequest(Request request)Show an existing request.RequestConfiguration.BuilderwithRequestId(java.lang.String id)Show an existing request.RequestConfiguration.BuilderwithRequestInfo(RequestInfo requestInfo)RequestConfiguration.BuilderwithRequestSubject(java.lang.String requestSubject)Attach request subject to the created requestRequestConfiguration.BuilderwithTags(java.util.List<java.lang.String> tags)Attach tags to the created request.RequestConfiguration.BuilderwithTags(java.lang.String... tags)Attach tags to the created request.RequestConfiguration.BuilderwithTicketForm(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 ofFileobjects to be selected as attachments to any requests created using thisRequestConfiguration.Note that this will use the
UploadProviderto 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)
SpecifyFileobjects to be selected as an attachment to any requests created using thisRequestConfiguration.Note that this will use the
UploadProviderto 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)DisplayRequestActivityto the user.- Parameters:
context- a validContextconfigurations- Configurations for screen that can be started from RequestActivity.
-
show
public void show(Context context, java.util.List<Configuration> configurations)DisplayRequestActivityto the user.- Parameters:
context- a validContextconfigurations- Configurations for screen that can be started from RequestActivity.
-
config
public Configuration config()
Create aConfigurationfor the passed in configuration options.
-
intent
public Intent intent(Context context, Configuration... configurations)Create anIntentto start theRequestActivitywith the specified configuration options.- Parameters:
context- The context whichstartActivitywill be invoked onconfigurations- Configurations for screen that can be started from RequestActivity.- Returns:
- An
IntentforRequestActivitywith the specified configuration options
-
intent
public Intent intent(Context context, java.util.List<Configuration> configurations)Create anIntentto start theRequestActivitywith the specified configuration options.- Parameters:
context- The context whichstartActivitywill be invoked onconfigurations- Configurations for screen that can be started from RequestActivity.- Returns:
- An
IntentforRequestActivitywith the specified configuration options
-
deepLinkIntent
public Intent deepLinkIntent(Context context, Intent... backStackActivities)Creates and returns anIntentfor starting aDeepLinkingBroadcastReceiver, for deep-linking to aRequestActivity.The returned Intent is intended to be wrapped in a
android.app.PendingIntentand set on a Notification (usingandroid.support.v4.app.NotificationCompat.Builder#setContentIntent(PendingIntent)).- Parameters:
context- the application contextbackStackActivities- an optional list ofIntents 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 anIntentfor starting aDeepLinkingBroadcastReceiver, for deep-linking to aRequestActivity.The returned Intent is intended to be wrapped in a
android.app.PendingIntentand set on a Notification (usingandroid.support.v4.app.NotificationCompat.Builder#setContentIntent(PendingIntent)).- Parameters:
context- the application contextconfigurations- Configurations for screen that can be started from RequestActivity.backStackActivities- an optional list ofIntents for a backstack of Activities to start- Returns:
- an Intent for this BroadcastReceiver
-
-