C - The object that is returned or Chained after creating the RequestMatcherpublic abstract class AbstractRequestMatcherRegistry<C>
extends java.lang.Object
RequestMatcher's. For example, it might allow for
specifying which RequestMatcher require a certain level of authorization.| Constructor and Description |
|---|
AbstractRequestMatcherRegistry() |
| Modifier and Type | Method and Description |
|---|---|
C |
antMatchers(org.springframework.http.HttpMethod method)
Maps a
List of
AntPathRequestMatcher
instances. |
C |
antMatchers(org.springframework.http.HttpMethod method,
java.lang.String... antPatterns)
Maps a
List of
AntPathRequestMatcher
instances. |
C |
antMatchers(java.lang.String... antPatterns)
|
C |
anyRequest()
Maps any request.
|
protected abstract C |
chainRequestMatchers(java.util.List<RequestMatcher> requestMatchers)
Subclasses should implement this method for returning the object that is chained to
the creation of the
RequestMatcher instances. |
protected java.util.List<MvcRequestMatcher> |
createMvcMatchers(org.springframework.http.HttpMethod method,
java.lang.String... mvcPatterns)
Creates
MvcRequestMatcher instances for the method and patterns passed in |
protected org.springframework.context.ApplicationContext |
getApplicationContext()
Gets the
ApplicationContext |
abstract C |
mvcMatchers(org.springframework.http.HttpMethod method,
java.lang.String... mvcPatterns)
Maps an
MvcRequestMatcher that also specifies a specific HttpMethod
to match on. |
abstract C |
mvcMatchers(java.lang.String... mvcPatterns)
Maps an
MvcRequestMatcher that does not care which HttpMethod is
used. |
C |
regexMatchers(org.springframework.http.HttpMethod method,
java.lang.String... regexPatterns)
Maps a
List of
RegexRequestMatcher
instances. |
C |
regexMatchers(java.lang.String... regexPatterns)
|
C |
requestMatchers(RequestMatcher... requestMatchers)
Associates a list of
RequestMatcher instances with the
AbstractConfigAttributeRequestMatcherRegistry |
protected void |
setApplicationContext(org.springframework.context.ApplicationContext context) |
protected final void setApplicationContext(org.springframework.context.ApplicationContext context)
protected final org.springframework.context.ApplicationContext getApplicationContext()
ApplicationContextApplicationContextpublic C anyRequest()
RequestMatcherpublic C antMatchers(org.springframework.http.HttpMethod method)
List of
AntPathRequestMatcher
instances.method - the HttpMethod to use for any HttpMethod.RequestMatcherpublic C antMatchers(org.springframework.http.HttpMethod method, java.lang.String... antPatterns)
List of
AntPathRequestMatcher
instances.method - the HttpMethod to use or null for any
HttpMethod.antPatterns - the ant patterns to create. If null or empty, then
matches on nothing.
AntPathRequestMatcher fromRequestMatcherpublic C antMatchers(java.lang.String... antPatterns)
antPatterns - the ant patterns to create
AntPathRequestMatcher fromRequestMatcherpublic abstract C mvcMatchers(java.lang.String... mvcPatterns)
Maps an MvcRequestMatcher that does not care which HttpMethod is
used. This matcher will use the same rules that Spring MVC uses for matching. For
example, often times a mapping of the path "/path" will match on "/path", "/path/",
"/path.html", etc.
If the current request will not be processed by Spring MVC, a reasonable default using the pattern as a ant pattern will be used.
mvcPatterns - the patterns to match on. The rules for matching are defined by
Spring MVCRequestMatcher.public abstract C mvcMatchers(org.springframework.http.HttpMethod method, java.lang.String... mvcPatterns)
Maps an MvcRequestMatcher that also specifies a specific HttpMethod
to match on. This matcher will use the same rules that Spring MVC uses for
matching. For example, often times a mapping of the path "/path" will match on
"/path", "/path/", "/path.html", etc.
If the current request will not be processed by Spring MVC, a reasonable default using the pattern as a ant pattern will be used.
method - the HTTP method to match onmvcPatterns - the patterns to match on. The rules for matching are defined by
Spring MVCRequestMatcher.protected final java.util.List<MvcRequestMatcher> createMvcMatchers(org.springframework.http.HttpMethod method, java.lang.String... mvcPatterns)
MvcRequestMatcher instances for the method and patterns passed inmethod - the HTTP method to use or null if any should be usedmvcPatterns - the Spring MVC patterns to match onMvcRequestMatcher instancespublic C regexMatchers(org.springframework.http.HttpMethod method, java.lang.String... regexPatterns)
List of
RegexRequestMatcher
instances.method - the HttpMethod to use or null for any
HttpMethod.regexPatterns - the regular expressions to create
RegexRequestMatcher fromRequestMatcherpublic C regexMatchers(java.lang.String... regexPatterns)
regexPatterns - the regular expressions to create
RegexRequestMatcher fromRequestMatcherpublic C requestMatchers(RequestMatcher... requestMatchers)
RequestMatcher instances with the
AbstractConfigAttributeRequestMatcherRegistryrequestMatchers - the RequestMatcher instancesRequestMatcherprotected abstract C chainRequestMatchers(java.util.List<RequestMatcher> requestMatchers)
RequestMatcher instances.requestMatchers - the RequestMatcher instances that were createdRequestMatcher