Class StandardServletPartUtils

java.lang.Object
org.springframework.web.multipart.support.StandardServletPartUtils

public abstract class StandardServletPartUtils extends Object
Utility methods for standard Servlet Part handling.
Since:
5.3
Author:
Juergen Hoeller
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    bindParts(jakarta.servlet.http.HttpServletRequest request, org.springframework.beans.MutablePropertyValues mpvs, boolean bindEmpty)
    Bind all parts from the given servlet request.
    static org.springframework.util.MultiValueMap<String, jakarta.servlet.http.Part>
    getParts(jakarta.servlet.http.HttpServletRequest request)
    Retrieve all parts from the given servlet request.
    static List<jakarta.servlet.http.Part>
    getParts(jakarta.servlet.http.HttpServletRequest request, String name)
    Retrieve all parts with the given name from the given servlet request.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StandardServletPartUtils

      public StandardServletPartUtils()
  • Method Details

    • getParts

      public static org.springframework.util.MultiValueMap<String, jakarta.servlet.http.Part> getParts(jakarta.servlet.http.HttpServletRequest request) throws MultipartException
      Retrieve all parts from the given servlet request.
      Parameters:
      request - the servlet request
      Returns:
      the parts in a MultiValueMap
      Throws:
      MultipartException - in case of failures
    • getParts

      public static List<jakarta.servlet.http.Part> getParts(jakarta.servlet.http.HttpServletRequest request, String name) throws MultipartException
      Retrieve all parts with the given name from the given servlet request.
      Parameters:
      request - the servlet request
      name - the name to look for
      Returns:
      the parts in a MultiValueMap
      Throws:
      MultipartException - in case of failures
    • bindParts

      public static void bindParts(jakarta.servlet.http.HttpServletRequest request, org.springframework.beans.MutablePropertyValues mpvs, boolean bindEmpty) throws MultipartException
      Bind all parts from the given servlet request.
      Parameters:
      request - the servlet request
      mpvs - the property values to bind to
      bindEmpty - whether to bind empty parts as well
      Throws:
      MultipartException - in case of failures