|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springjutsu.validation.util.RequestUtils
public class RequestUtils
A utility class for manipulating requests, or for searching request metadata, etc.
| Field Summary | |
|---|---|
static String |
PATH_VAR_PATTERN
A pattern describing a RESTful url variable |
| Constructor Summary | |
|---|---|
RequestUtils()
|
|
| Method Summary | |
|---|---|
static Annotation |
findHandlerAnnotation(Class handlerClass,
Class annotationClass)
Find an annotation on the possibly proxied handler. |
static String |
findMatchingRestPath(String[] candidateViewNames,
String[] controllerPaths,
javax.servlet.http.HttpServletRequest request)
Since successView and validationFailureView can contain multiple possible redirection paths using the format incomingRequestPath=outgoingRedirectPath, we'll need to identify which incomingRequestPath best matches the request that generated this validation, and then return the view name (outgoingRedirectPath) associated with that path. |
static String[] |
getControllerRequestPaths(org.springframework.web.method.HandlerMethod handler)
Given a handler object, return the base controller class-level requestMapping paths. |
static javax.servlet.http.HttpServletRequest |
getRequest()
|
static Map |
getRequestParameters()
|
static boolean |
isWebflowRequest()
|
static String |
removeLeadingAndTrailingSlashes(String path)
Removes the leading and trailing slashes from a url path. |
static String |
replaceRestPathVariables(String viewName,
Map<String,Object> model,
javax.servlet.http.HttpServletRequest request)
Used by successView and validationFailureView. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PATH_VAR_PATTERN
| Constructor Detail |
|---|
public RequestUtils()
| Method Detail |
|---|
public static javax.servlet.http.HttpServletRequest getRequest()
public static Map getRequestParameters()
public static String replaceRestPathVariables(String viewName,
Map<String,Object> model,
javax.servlet.http.HttpServletRequest request)
viewName - The view potentially containing wildcardsmodel - the model maprequest - the request
public static String findMatchingRestPath(String[] candidateViewNames,
String[] controllerPaths,
javax.servlet.http.HttpServletRequest request)
candidateViewNames - The possible viewscontrollerPaths - The base path(s) from the controllerrequest - the request
public static String[] getControllerRequestPaths(org.springframework.web.method.HandlerMethod handler)
handler - the handler object
public static Annotation findHandlerAnnotation(Class handlerClass,
Class annotationClass)
handler - The handler / controllerannotationClass - The annotation to find.
public static String removeLeadingAndTrailingSlashes(String path)
path - the path
public static boolean isWebflowRequest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||