public class RepositoryRestHandlerMapping extends RequestMappingHandlerMapping
RequestMappingHandlerMapping
implementation that will only find a handler method if a
Repository
is exported under that URL path segment. Also ensures the
OpenEntityManagerInViewInterceptor
is registered in the application context. The OEMIVI is required for the
REST exporter to function properly.logger
BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
RepositoryRestHandlerMapping(ResourceMappings mappings,
RepositoryRestConfiguration config)
Creates a new
RepositoryRestHandlerMapping for the given ResourceMappings and
RepositoryRestConfiguration . |
Modifier and Type | Method and Description |
---|---|
protected void |
extendInterceptors(List<Object> interceptors) |
protected boolean |
isHandler(Class<?> beanType) |
protected HandlerMethod |
lookupHandlerMethod(String lookupPath,
javax.servlet.http.HttpServletRequest origRequest) |
void |
setJpaHelper(JpaHelper jpaHelper) |
afterPropertiesSet, createRequestMappingInfo, getContentNegotiationManager, getCustomMethodCondition, getCustomTypeCondition, getFileExtensions, getMappingForMethod, resolveEmbeddedValuesInPatterns, setContentNegotiationManager, setEmbeddedValueResolver, setUseRegisteredSuffixPatternMatch, setUseSuffixPatternMatch, setUseTrailingSlashMatch, useRegisteredSuffixPatternMatch, useSuffixPatternMatch, useTrailingSlashMatch
getMappingComparator, getMappingPathPatterns, getMatchingMapping, handleMatch, handleNoMatch
createHandlerMethod, detectHandlerMethods, getHandlerInternal, getHandlerMethods, handlerMethodsInitialized, initHandlerMethods, registerHandlerMethod, setDetectHandlerMethodsInAncestorContexts
adaptInterceptor, detectMappedInterceptors, getAdaptedInterceptors, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getUrlPathHelper, initApplicationContext, initInterceptors, setAlwaysUseFullPath, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
public RepositoryRestHandlerMapping(ResourceMappings mappings, RepositoryRestConfiguration config)
RepositoryRestHandlerMapping
for the given ResourceMappings
and
RepositoryRestConfiguration
.mappings
- must not be null.config
- must not be null.public void setJpaHelper(JpaHelper jpaHelper)
jpaHelper
- the jpaHelper to setprotected HandlerMethod lookupHandlerMethod(String lookupPath, javax.servlet.http.HttpServletRequest origRequest) throws Exception
lookupHandlerMethod
in class AbstractHandlerMethodMapping<RequestMappingInfo>
Exception
protected boolean isHandler(Class<?> beanType)
isHandler
in class RequestMappingHandlerMapping
protected void extendInterceptors(List<Object> interceptors)
extendInterceptors
in class AbstractHandlerMapping
Copyright © 2011-2013-2014 Pivotal. All Rights Reserved.