Package io.microsphere.spring.web.util
Enum WebSource
- java.lang.Object
-
- java.lang.Enum<WebSource>
-
- io.microsphere.spring.web.util.WebSource
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<WebSource>
public enum WebSource extends java.lang.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 Summary
Enum Constants Enum Constant Description MATRIX_VARIABLEThe source from the request matrix variablePATH_VARIABLEThe source from the request path variableREQUEST_ATTRIBUTEThe source from the request attributeREQUEST_BODYThe source from the request bodyREQUEST_COOKIEThe source from the request cookieREQUEST_HEADERThe source from the request headerREQUEST_PARAMETERThe source from the request parameterSESSION_ATTRIBUTEThe source from the session attribute
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringgetValue(org.springframework.web.context.request.NativeWebRequest request, java.lang.String name)Get the value of the request by the specified namestatic WebSourcevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static WebSource[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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_COOKIE
public static final WebSource REQUEST_COOKIE
The source from the request cookie- See Also:
CookieValue
-
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 Detail
-
values
public static WebSource[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (WebSource c : WebSource.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WebSource valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getValue
@Nullable public abstract java.lang.String getValue(org.springframework.web.context.request.NativeWebRequest request, java.lang.String name)Get the value of the request by the specified name- Parameters:
request-NativeWebRequestname- the name of request value- Returns:
nullif not found
-
-