fr.paris.lutece.portal.util.mvc.utils
Class MVCUtils

java.lang.Object
  extended by fr.paris.lutece.portal.util.mvc.utils.MVCUtils

public final class MVCUtils
extends Object

Utils for MVC components


Field Summary
static String PARAMETER_ACTION
           
static String PARAMETER_PAGE
           
static String PARAMETER_VIEW
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_VIEW

public static final String PARAMETER_VIEW
See Also:
Constant Field Values

PARAMETER_ACTION

public static final String PARAMETER_ACTION
See Also:
Constant Field Values

PARAMETER_PAGE

public static final String PARAMETER_PAGE
See Also:
Constant Field Values
Method Detail

getView

public static String getView(javax.servlet.http.HttpServletRequest request)
Get the view parameter

Parameters:
request - The HTTP request
Returns:
The view parameter or null if not found

getAction

public static String getAction(javax.servlet.http.HttpServletRequest request)
Get the action parameter or any parameter with the prefix 'action_'

Parameters:
request - The HTTP request
Returns:
The action parameter or null if not found

findViewAnnotedMethod

public static Method findViewAnnotedMethod(javax.servlet.http.HttpServletRequest request,
                                           Method[] methods)
Find the method that provide a given view

Parameters:
request - The HTTP request
methods - The methods list
Returns:
The method

findActionAnnotedMethod

public static Method findActionAnnotedMethod(javax.servlet.http.HttpServletRequest request,
                                             Method[] methods)
Find the method that provide a given action

Parameters:
request - The HTTP request
methods - The methods list
Returns:
The method

findDefaultViewMethod

public static Method findDefaultViewMethod(Method[] methods)
Find the method that provide the default view

Parameters:
methods - The methods list
Returns:
The method

getLogger

public static org.apache.log4j.Logger getLogger()
Return the MVC logger

Returns:
THe logger


Copyright © 2013 Mairie de Paris. All Rights Reserved.