Package io.microsphere.spring.web.util
Enum Class WebSource
- All Implemented Interfaces:
Serializable,Comparable<WebSource>,Constable
The source from the web.
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
RequestAttributeSessionAttributeRequestParamRequestHeaderCookieValueRequestBodyPathVariableMatrixVariableHttpServletRequestServerHttpRequest
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe source from the request matrix variableThe source from the request path variableThe source from the request attributeThe source from the request bodyThe source from the request cookieThe source from the request headerThe source from the request parameterThe source from the session attribute -
Method Summary
Modifier and TypeMethodDescriptionabstract StringGet the value of the request by the specified namestatic WebSourceReturns the enum constant of this class with the specified name.static WebSource[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REQUEST_ATTRIBUTE
The source from the request attribute- See Also:
-
RequestAttribute
-
SESSION_ATTRIBUTE
The source from the session attribute- See Also:
-
SessionAttribute
-
REQUEST_PARAMETER
The source from the request parameter- See Also:
-
RequestParam
-
REQUEST_HEADER
The source from the request header- See Also:
-
RequestHeader
-
REQUEST_COOKIE
The source from the request cookie- See Also:
-
CookieValue
-
REQUEST_BODY
The source from the request body- See Also:
-
RequestBody
-
PATH_VARIABLE
The source from the request path variable- See Also:
-
PathVariable
-
MATRIX_VARIABLE
The source from the request matrix variable- See Also:
-
MatrixVariable
-
-
Method Details
-
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
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 nameNullPointerException- 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-NativeWebRequestname- the name of request value- Returns:
nullif not found
-