org.springframework.web.portlet.mvc.annotation
Class PortletAnnotationMappingUtils

java.lang.Object
  extended by org.springframework.web.portlet.mvc.annotation.PortletAnnotationMappingUtils

abstract class PortletAnnotationMappingUtils
extends java.lang.Object

Helper class for annotation-based request mapping.

Since:
2.5.2
Author:
Juergen Hoeller

Constructor Summary
PortletAnnotationMappingUtils()
           
 
Method Summary
static boolean checkHeaders(java.lang.String[] headers, PortletRequest request)
          Check whether the given request matches the specified header conditions.
static boolean checkParameters(java.lang.String[] params, PortletRequest request)
          Check whether the given request matches the specified parameter conditions.
static boolean checkRequestMethod(RequestMethod[] methods, PortletRequest request)
          Check whether the given request matches the specified request methods.
static boolean checkRequestMethod(java.util.Set<java.lang.String> methods, PortletRequest request)
          Check whether the given request matches the specified request methods.
private static boolean isMediaTypeHeader(java.lang.String headerName)
           
static boolean validateModeMapping(java.lang.String[] modes, java.lang.String[] typeLevelModes)
          Check whether the given portlet modes matches the specified type-level modes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletAnnotationMappingUtils

PortletAnnotationMappingUtils()
Method Detail

validateModeMapping

public static boolean validateModeMapping(java.lang.String[] modes,
                                          java.lang.String[] typeLevelModes)
Check whether the given portlet modes matches the specified type-level modes.

Parameters:
modes - the mapped portlet modes to check
typeLevelModes - the type-level mode mappings to check against

checkRequestMethod

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

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

checkRequestMethod

public static boolean checkRequestMethod(java.util.Set<java.lang.String> methods,
                                         PortletRequest request)
Check whether the given request matches the specified request methods.

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

checkParameters

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

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

checkHeaders

public static boolean checkHeaders(java.lang.String[] headers,
                                   PortletRequest 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)