Class FileListDescriptor.Builder

    • Method Detail

      • build

        public FileListDescriptor build()
        Builds a new FileListDescriptor with the data set in this builder. Any modifications to this builder after calling this method will not affect the returned descriptor.
        Returns:
        A new descriptor with the data set in this builder.
      • contentTypes

        public FileListDescriptor.Builder contentTypes​(Set<String> contentTypes)
        Adds content types that are allowed for the files.
        Parameters:
        contentTypes - The content types that are allowed for the files.
        Returns:
        This builder for chaining method calls.
      • contentTypes

        public FileListDescriptor.Builder contentTypes​(String... contentTypes)
        Adds content types that are allowed for the files.
        Parameters:
        contentTypes - The content types that are allowed for the files.
        Returns:
        This builder for chaining method calls.
      • description

        public FileListDescriptor.Builder description​(String descriptionI18n)
        Sets the I18n key pointing to a description for the file.
        Parameters:
        descriptionI18n - The I18n key pointing to a description for the file.
        Returns:
        This builder for chaining method calls.
      • descriptionHtml

        public FileListDescriptor.Builder descriptionHtml​(boolean descriptionHtml)
        Sets whether the description is an HTML string. When false, the description is treated as plain text. Defaults to false.
        Parameters:
        descriptionHtml - Whether the description is an HTML string.
        Returns:
        This builder for chaining method calls.
      • descriptionI18nKey

        public FileListDescriptor.Builder descriptionI18nKey​(boolean descriptionI18nKey)
        Sets whether the description is an I18N key that needs to be looked up in a resource bundle. When false, the description is used as-is. Defaults to true.
        Parameters:
        descriptionI18nKey - Whether the description is an I18N string.
        Returns:
        This builder for chaining method calls.
      • maxFileCount

        public FileListDescriptor.Builder maxFileCount​(int maxFileCount)
        Sets the maximum number of files that can be provided.
        Parameters:
        maxFileCount - The maximum number of files that can be provided.
        Returns:
        This builder for chaining method calls.
      • minFileCount

        public FileListDescriptor.Builder minFileCount​(int minFileCount)
        Sets the minimum number of files that must be provided.
        Parameters:
        minFileCount - The minimum number of files that must be provided.
        Returns:
        This builder for chaining method calls.