Class RequestConfiguration.Builder

  • Enclosing class:
    RequestConfiguration


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

      • Builder

        public Builder()
    • Method Detail

      • withRequestSubject

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

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

      • 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 of File objects to be selected as attachments to any requests created using this RequestConfiguration.

        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)
        Specify File objects to be selected as an attachment to any requests created using this RequestConfiguration.

        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.

      • show

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

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

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

        public Intent intent(Context context,
                             Configuration... configurations)
        Create an Intent to start the RequestActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        configurations - 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<Configuration> configurations)
        Create an Intent to start the RequestActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        configurations - 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 androidx.core.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<Configuration> configurations,
                                     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 androidx.core.app.NotificationCompat.Builder#setContentIntent(PendingIntent)).

        Parameters:
        context - the application context
        configurations - 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