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. Use a singleton set with "*/*" to allow all content types. Use an asterisk as a wildcard to allow a range of content types, e.g. "image/*". An empty set allows no content types. Defaults to a singleton set with "*/*".
        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. Use a singleton set with "*/*" to allow all content types. Use an asterisk as a wildcard to allow a range of content types, e.g. "image/*". An empty set allows no content types. Defaults to a singleton set with "*/*".
        Parameters:
        contentTypes - The content types that are allowed for the files.
        Returns:
        This builder for chaining method calls.
      • extensions

        public FileListDescriptor.Builder extensions​(Set<String> extensions)
        Adds file extensions that are allowed for the files. Use the empty string to allow files without an extension. Use a singleton set with "*" to allow all files. An empty set allows no files. Defaults to a singleton set with "*".
        Parameters:
        extensions - The file extensions that are allowed for the files, without leading dot.
        Returns:
        This builder for chaining method calls.
      • extensions

        public FileListDescriptor.Builder extensions​(String... extensions)
        Adds file extensions that are allowed for the files. Use the empty string to allow files without an extension. Use a singleton set with "*" to allow all files. An empty set allows no files. Defaults to a singleton set with "*".
        Parameters:
        extensions - The file extensions that are allowed for the files, without leading dot.
        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.