Class MVCUtils

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

public final class MVCUtils extends Object
Utils for MVC components
  • Field Details

  • Method Details

    • getView

      public static String getView(jakarta.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(jakarta.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(jakarta.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(jakarta.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
    • addDownloadHeaderToResponse

      public static void addDownloadHeaderToResponse(jakarta.servlet.http.HttpServletResponse response, String strFilename, String strContentType)
      Add download headers to the response
      Parameters:
      response - The response
      strFilename - The name of the file to download
      strContentType - The content type of the downloaded file
    • getLogger

      public static org.apache.logging.log4j.Logger getLogger()
      Return the MVC logger
      Returns:
      THe logger