类 AbstractMultipartRequest

java.lang.Object
cn.taketoday.web.multipart.support.AbstractMultipartRequest
所有已实现的接口:
MultipartRequest
直接已知子类:
ServletMultipartRequest

public abstract class AbstractMultipartRequest extends Object implements MultipartRequest
Abstract base implementation of the MultipartRequest interface.

Provides management of pre-generated MultipartFile instances.

从以下版本开始:
4.0 2022/4/28 17:16
作者:
Harry Yang
  • 字段详细资料

    • parts

      @Nullable private cn.taketoday.util.MultiValueMap<String,Multipart> parts
    • multipartFiles

      @Nullable private cn.taketoday.util.MultiValueMap<String,MultipartFile> multipartFiles
  • 构造器详细资料

    • AbstractMultipartRequest

      public AbstractMultipartRequest()
  • 方法详细资料

    • getFileNames

      public Iterator<String> getFileNames()
      从接口复制的说明: MultipartRequest
      Return an Iterator of String objects containing the parameter names of the multipart files contained in this request. These are the field names of the form (like with normal parameters), not the original file names.
      指定者:
      getFileNames 在接口中 MultipartRequest
      返回:
      the names of the files
    • getFile

      public MultipartFile getFile(String name)
      从接口复制的说明: MultipartRequest
      Return the contents plus description of an uploaded file in this request, or null if it does not exist.
      指定者:
      getFile 在接口中 MultipartRequest
      参数:
      name - a String specifying the parameter name of the multipart file
      返回:
      the uploaded content in the form of a MultipartFile object
    • getFiles

      public List<MultipartFile> getFiles(String name)
      从接口复制的说明: MultipartRequest
      Return the contents plus description of uploaded files in this request, or an empty list if it does not exist.
      指定者:
      getFiles 在接口中 MultipartRequest
      参数:
      name - a String specifying the parameter name of the multipart file
      返回:
      the uploaded content in the form of a MultipartFile list
    • multipartData

      public List<Multipart> multipartData(String name)
      从接口复制的说明: MultipartRequest
      Return the contents in this request, or an empty list if it does not exist.
      指定者:
      multipartData 在接口中 MultipartRequest
      参数:
      name - a String specifying the parameter name of the multipart
    • getFileMap

      public Map<String,MultipartFile> getFileMap()
      从接口复制的说明: MultipartRequest
      Return a Map of the multipart files contained in this request.
      指定者:
      getFileMap 在接口中 MultipartRequest
      返回:
      a map containing the parameter names as keys, and the MultipartFile objects as values
    • getMultipartFiles

      public cn.taketoday.util.MultiValueMap<String,MultipartFile> getMultipartFiles()
      Obtain the MultipartFile Map for retrieval, lazily initializing it if necessary.
      指定者:
      getMultipartFiles 在接口中 MultipartRequest
      返回:
      a map containing the parameter names as keys, and a list of MultipartFile objects as values
      另请参阅:
    • multipartData

      public cn.taketoday.util.MultiValueMap<String,Multipart> multipartData()
      从接口复制的说明: MultipartRequest
      Get the parts of a multipart request, provided the Content-Type is "multipart/form-data", or an exception otherwise.
      指定者:
      multipartData 在接口中 MultipartRequest
      返回:
      the multipart data, mapping from name to part(s)
      另请参阅:
    • isResolved

      public boolean isResolved()
      Determine whether the underlying multipart request has been resolved.
      返回:
      true when eagerly initialized or lazily triggered, false in case of a lazy-resolution request that got aborted before any parameters or multipart files have been accessed
      另请参阅:
    • cleanup

      public void cleanup()
      从接口复制的说明: MultipartRequest
      Cleanup any resources used for the multipart handling, like a storage for the uploaded files.
      指定者:
      cleanup 在接口中 MultipartRequest
    • parseRequest

      protected abstract cn.taketoday.util.MultiValueMap<String,Multipart> parseRequest()
      Lazily initialize the multipart request, if possible. Only called if not already eagerly initialized.