org.springframework.web.servlet.mvc.annotation
Class ServletAnnotationMappingUtils

java.lang.Object
  extended by org.springframework.web.servlet.mvc.annotation.ServletAnnotationMappingUtils

abstract class ServletAnnotationMappingUtils
extends java.lang.Object

Helper class for annotation-based request mapping.

Since:
2.5.2
Author:
Juergen Hoeller, Arjen Poutsma

Constructor Summary
ServletAnnotationMappingUtils()
           
 
Method Summary
static boolean checkHeaders(java.lang.String[] headers, HttpServletRequest request)
          Check whether the given request matches the specified header conditions.
static boolean checkParameters(java.lang.String[] params, HttpServletRequest request)
          Check whether the given request matches the specified parameter conditions.
static boolean checkRequestMethod(RequestMethod[] methods, HttpServletRequest request)
          Check whether the given request matches the specified request methods.
private static boolean isMediaTypeHeader(java.lang.String headerName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletAnnotationMappingUtils

ServletAnnotationMappingUtils()
Method Detail

checkRequestMethod

public static boolean checkRequestMethod(RequestMethod[] methods,
                                         HttpServletRequest request)
Check whether the given request matches the specified request methods.

Parameters:
methods - the HTTP request methods to check against
request - the current HTTP request to check

checkParameters

public static boolean checkParameters(java.lang.String[] params,
                                      HttpServletRequest request)
Check whether the given request matches the specified parameter conditions.

Parameters:
params - the parameter conditions, following RequestMapping.#params()
request - the current HTTP request to check

checkHeaders

public static boolean checkHeaders(java.lang.String[] headers,
                                   HttpServletRequest request)
Check whether the given request matches the specified header conditions.

Parameters:
headers - the header conditions, following RequestMapping.headers()
request - the current HTTP request to check

isMediaTypeHeader

private static boolean isMediaTypeHeader(java.lang.String headerName)