Class RequestUiConfig.Builder

  • Enclosing class:
    RequestUiConfig


    public static class RequestUiConfig.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • withRequestSubject

        public RequestUiConfig.Builder withRequestSubject(java.lang.String requestSubject)
        Attach request subject to the created request

        This 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.

      • 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 of File objects to be selected as attachments to any requests created using this RequestUiConfig. 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 RequestUiConfig.Builder withFiles(java.io.File... files)
        Specify File objects to be selected as an attachment to any requests created using this RequestUiConfig. 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 RequestUiConfig.Builder withCustomFields(java.util.List<CustomField> customFields)
        Attach a custom field form to the request.

        This information is only used for new requests.

      • show

        public void show(Context context,
                         UiConfig... uiConfigs)
        Display RequestActivity to the user.
        Parameters:
        context - a valid Context
        uiConfigs - Configurations for screen that can be started from RequestActivity.
      • show

        public void show(Context context,
                         java.util.List<UiConfig> uiConfigs)
        Display RequestActivity to the user.
        Parameters:
        context - a valid Context
        uiConfigs - Configurations for screen that can be started from RequestActivity.
      • config

        public UiConfig config()
        Create a UiConfig for the passed in configuration options.
      • intent

        public Intent intent(Context context,
                             UiConfig... uiConfigs)
        Create an Intent to start the RequestActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        uiConfigs - Configurations for screen that can be started from RequestActivity.
        Returns:
        An Intent for RequestActivity with the specified configuration options
      • intent

        public Intent intent(Context context,
                             java.util.List<UiConfig> uiConfigs)
        Create an Intent to start the RequestActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        uiConfigs - Configurations for screen that can be started from RequestActivity.
        Returns:
        An Intent for RequestActivity with the specified configuration options
      • deepLinkIntent

        public Intent deepLinkIntent(Context context,
                                     Intent... backStackActivities)
        Creates and returns an Intent for starting a DeepLinkingBroadcastReceiver, for deep-linking to a RequestActivity. The returned Intent is intended to be wrapped in a android.app.PendingIntent and set on a Notification (using android.support.v4.app.NotificationCompat.Builder#setContentIntent(PendingIntent)).
        Parameters:
        context - the application context
        backStackActivities - an optional list of Intents 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 an Intent for starting a DeepLinkingBroadcastReceiver, for deep-linking to a RequestActivity. The returned Intent is intended to be wrapped in a android.app.PendingIntent and set on a Notification (using android.support.v4.app.NotificationCompat.Builder#setContentIntent(PendingIntent)).
        Parameters:
        context - the application context
        uiConfigs - Configurations for screen that can be started from RequestActivity.
        backStackActivities - an optional list of Intents for a backstack of Activities to start
        Returns:
        an Intent for this BroadcastReceiver