public final class MVCUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PARAMETER_ACTION |
static String |
PARAMETER_PAGE |
static String |
PARAMETER_VIEW |
Modifier and Type | Method and Description |
---|---|
static void |
addDownloadHeaderToResponse(javax.servlet.http.HttpServletResponse response,
String strFilename,
String strContentType)
Add download headers to the response
|
static Method |
findActionAnnotedMethod(javax.servlet.http.HttpServletRequest request,
Method[] methods)
Find the method that provide a given action
|
static Method |
findDefaultViewMethod(Method[] methods)
Find the method that provide the default view
|
static Method |
findViewAnnotedMethod(javax.servlet.http.HttpServletRequest request,
Method[] methods)
Find the method that provide a given view
|
static String |
getAction(javax.servlet.http.HttpServletRequest request)
Get the action parameter or any parameter with the prefix 'action_'
|
static org.apache.log4j.Logger |
getLogger()
Return the MVC logger
|
static String |
getView(javax.servlet.http.HttpServletRequest request)
Get the view parameter
|
public static final String PARAMETER_VIEW
public static final String PARAMETER_ACTION
public static final String PARAMETER_PAGE
public static String getView(javax.servlet.http.HttpServletRequest request)
request
- The HTTP requestpublic static String getAction(javax.servlet.http.HttpServletRequest request)
request
- The HTTP requestpublic static Method findViewAnnotedMethod(javax.servlet.http.HttpServletRequest request, Method[] methods)
request
- The HTTP requestmethods
- The methods listpublic static Method findActionAnnotedMethod(javax.servlet.http.HttpServletRequest request, Method[] methods)
request
- The HTTP requestmethods
- The methods listpublic static Method findDefaultViewMethod(Method[] methods)
methods
- The methods listpublic static void addDownloadHeaderToResponse(javax.servlet.http.HttpServletResponse response, String strFilename, String strContentType)
response
- The responsestrFilename
- The name of the file to downloadstrContentType
- The content type of the downloaded filepublic static org.apache.log4j.Logger getLogger()
Copyright © 2020 City of Paris. All rights reserved.