Enum Class WebSource

java.lang.Object
java.lang.Enum<WebSource>
io.microsphere.spring.web.util.WebSource
All Implemented Interfaces:
Serializable, Comparable<WebSource>, Constable

public enum WebSource extends Enum<WebSource>
The source from the web.
Since:
1.0.0
Author:
Mercy
See Also:
  • RequestAttribute
  • SessionAttribute
  • RequestParam
  • RequestHeader
  • CookieValue
  • RequestBody
  • PathVariable
  • MatrixVariable
  • HttpServletRequest
  • ServerHttpRequest
  • Enum Constant Details

    • REQUEST_ATTRIBUTE

      public static final WebSource REQUEST_ATTRIBUTE
      The source from the request attribute
      See Also:
      • RequestAttribute
    • SESSION_ATTRIBUTE

      public static final WebSource SESSION_ATTRIBUTE
      The source from the session attribute
      See Also:
      • SessionAttribute
    • REQUEST_PARAMETER

      public static final WebSource REQUEST_PARAMETER
      The source from the request parameter
      See Also:
      • RequestParam
    • REQUEST_HEADER

      public static final WebSource REQUEST_HEADER
      The source from the request header
      See Also:
      • RequestHeader
    • REQUEST_BODY

      public static final WebSource REQUEST_BODY
      The source from the request body
      See Also:
      • RequestBody
    • PATH_VARIABLE

      public static final WebSource PATH_VARIABLE
      The source from the request path variable
      See Also:
      • PathVariable
    • MATRIX_VARIABLE

      public static final WebSource MATRIX_VARIABLE
      The source from the request matrix variable
      See Also:
      • MatrixVariable
  • Method Details

    • values

      public static WebSource[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static WebSource valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      @Nullable public abstract String getValue(org.springframework.web.context.request.NativeWebRequest request, String name)
      Get the value of the request by the specified name
      Parameters:
      request - NativeWebRequest
      name - the name of request value
      Returns:
      null if not found