org.springframework.security.oauth2.provider.endpoint
Class FrameworkEndpointHandlerMapping

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.handler.AbstractHandlerMapping
              extended by org.springframework.web.servlet.handler.AbstractHandlerMethodMapping<org.springframework.web.servlet.mvc.method.RequestMappingInfo>
                  extended by org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping
                      extended by org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
                          extended by org.springframework.security.oauth2.provider.endpoint.FrameworkEndpointHandlerMapping
All Implemented Interfaces:
Aware, InitializingBean, ApplicationContextAware, Ordered, ServletContextAware, HandlerMapping

public class FrameworkEndpointHandlerMapping
extends org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping

A handler mapping for framework endpoints (those annotated with @FrameworkEndpoint).

Author:
Dave Syer

Field Summary
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Fields inherited from interface org.springframework.web.servlet.HandlerMapping
BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
FrameworkEndpointHandlerMapping()
           
 
Method Summary
protected  org.springframework.web.servlet.mvc.method.RequestMappingInfo getMappingForMethod(Method method, Class<?> handlerType)
           
protected  boolean isHandler(Class<?> beanType)
          Detects @FrameworkEndpoint annotations in handler beans.
 void setApprovalParameter(String approvalParameter)
          The name of the request parameter that distinguishes a call to approve an authorization.
 void setMappings(Map<String,String> patternMap)
          Custom mappings for framework endpoint paths.
 
Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
getCustomMethodCondition, getCustomTypeCondition, setUseSuffixPatternMatch, setUseTrailingSlashMatch, useSuffixPatternMatch, useTrailingSlashMatch
 
Methods inherited from class org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping
getMappingComparator, getMappingPathPatterns, getMatchingMapping, handleMatch, handleNoMatch
 
Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerMethodMapping
afterPropertiesSet, detectHandlerMethods, getHandlerInternal, getHandlerMethods, handlerMethodsInitialized, initHandlerMethods, lookupHandlerMethod, registerHandlerMethod, setDetectHandlerMethodsInAncestorContexts
 
Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerMapping
adaptInterceptor, detectMappedInterceptors, extendInterceptors, getAdaptedInterceptors, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getUrlPathHelper, initApplicationContext, initInterceptors, setAlwaysUseFullPath, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setUrlDecode, setUrlPathHelper
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrameworkEndpointHandlerMapping

public FrameworkEndpointHandlerMapping()
Method Detail

setMappings

public void setMappings(Map<String,String> patternMap)
Custom mappings for framework endpoint paths. The keys in the map are the default framework endpoint path, e.g. "/oauth/authorize", and the values are the desired runtime paths.

Parameters:
mappings - the mappings to set

setApprovalParameter

public void setApprovalParameter(String approvalParameter)
The name of the request parameter that distinguishes a call to approve an authorization. Default is AuthorizationRequest.USER_OAUTH_APPROVAL.

Parameters:
approvalParameter - the approvalParameter to set

isHandler

protected boolean isHandler(Class<?> beanType)
Detects @FrameworkEndpoint annotations in handler beans.

Overrides:
isHandler in class org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
See Also:
RequestMappingHandlerMapping.isHandler(java.lang.Class)

getMappingForMethod

protected org.springframework.web.servlet.mvc.method.RequestMappingInfo getMappingForMethod(Method method,
                                                                                            Class<?> handlerType)
Overrides:
getMappingForMethod in class org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping


Copyright © 2012. All Rights Reserved.