In contrast to PathPatternsRequestCondition which uses parsed
PathPatterns, this condition does String pattern matching via
AntPathMatcher.
| Modifier and Type | Field and Description |
|---|---|
| private static final Set | |
| private final List | |
| private final PathMatcher | |
| private final Set | |
| private static final String[] | |
| private final boolean | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | PatternsRequestCondition(String...
0 or more URL patterns; no patterns results in an empty
path patterns)"" mapping which matches all requests.Constructor with URL patterns which are prepended with "/" if necessary. |
| public | PatternsRequestCondition(String[] patterns, boolean useTrailingSlashMatch, PathMatcher pathMatcher)
Variant of |
| public | PatternsRequestCondition(String[] patterns, UrlPathHelper urlPathHelper, PathMatcher pathMatcher, boolean useTrailingSlashMatch)
Deprecated
as of 5.3 in favor of
PatternsRequestCondition(String[], boolean, PathMatcher).
Variant of |
| public | PatternsRequestCondition(String[] patterns, UrlPathHelper urlPathHelper, PathMatcher pathMatcher, boolean useSuffixPatternMatch, boolean useTrailingSlashMatch)
Deprecated
as of 5.2.4.
Variant of |
| public | PatternsRequestCondition(String[] patterns, UrlPathHelper urlPathHelper, PathMatcher pathMatcher, boolean useSuffixPatternMatch, boolean useTrailingSlashMatch, List<String> fileExtensions)
Deprecated
as of 5.2.4.
Variant of |
| private | PatternsRequestCondition(Set<String> patterns, PatternsRequestCondition other)
Private constructor for use when combining and matching. |
| Modifier and Type | Method and Description |
|---|---|
| public PatternsRequestCondition | combine(PatternsRequestCondition
the condition to combine with. other)Implements org. Combine the patterns of the current and of the other instances as follows:
|
| public int | compareTo(PatternsRequestCondition other, HttpServletRequest request)
Implements org. Compare the two conditions based on the URL patterns they contain. |
| protected Collection | getContent()
Implements abstract org. Return the discrete items a request condition is composed of. |
| public Set | |
| public PatternsRequestCondition | Returns: the same instance if the condition contains no patterns; or a new condition with sorted matching patterns; ornull if no patterns match.the current request request)Implements org. Checks if any of the patterns match the given request and returns an instance
that is guaranteed to contain matching patterns, sorted via
|
| private String | |
| public List | Returns: a collection of matching patterns sorted with the closest match at the topthe lookup path to match to existing patterns lookupPath)Find the patterns matching the given lookup path. |
| public Set | |
| protected String | getToStringInfix()
Implements abstract org. The notation to use when printing discrete items of content. |
| private static boolean | |
| private static Set | |
| public boolean |
| EMPTY_PATH_PATTERN | back to summary |
|---|---|
| private static final Set<String> EMPTY_PATH_PATTERN | |
| fileExtensions | back to summary |
|---|---|
| private final List<String> fileExtensions | |
| pathMatcher | back to summary |
|---|---|
| private final PathMatcher pathMatcher | |
| patterns | back to summary |
|---|---|
| private final Set<String> patterns | |
| ROOT_PATH_PATTERNS | back to summary |
|---|---|
| private static final String[] ROOT_PATH_PATTERNS | |
| useSuffixPatternMatch | back to summary |
|---|---|
| private final boolean useSuffixPatternMatch | |
| useTrailingSlashMatch | back to summary |
|---|---|
| private final boolean useTrailingSlashMatch | |
| PatternsRequestCondition | back to summary |
|---|---|
| public PatternsRequestCondition(String... patterns) Constructor with URL patterns which are prepended with "/" if necessary.
| |
| PatternsRequestCondition | back to summary |
|---|---|
| public PatternsRequestCondition(String[] patterns, boolean useTrailingSlashMatch, PathMatcher pathMatcher) Variant of
| |
| PatternsRequestCondition | back to summary |
|---|---|
| public PatternsRequestCondition(String[] patterns, UrlPathHelper urlPathHelper, PathMatcher pathMatcher, boolean useTrailingSlashMatch)
Deprecated as of 5.3 in favor of
Variant of As of 5.3 the path is obtained through the static method
| |
| PatternsRequestCondition | back to summary |
|---|---|
| public PatternsRequestCondition(String[] patterns, UrlPathHelper urlPathHelper, PathMatcher pathMatcher, boolean useSuffixPatternMatch, boolean useTrailingSlashMatch)
Deprecated as of 5.2.4. See class-level note in
Variant of As of 5.3 the path is obtained through the static method
| |
| PatternsRequestCondition | back to summary |
|---|---|
| public PatternsRequestCondition(String[] patterns, UrlPathHelper urlPathHelper, PathMatcher pathMatcher, boolean useSuffixPatternMatch, boolean useTrailingSlashMatch, List<String> fileExtensions)
Deprecated as of 5.2.4. See class-level note in
Variant of As of 5.3 the path is obtained through the static method
| |
| PatternsRequestCondition | back to summary |
|---|---|
| private PatternsRequestCondition(Set<String> patterns, PatternsRequestCondition other) Private constructor for use when combining and matching. | |
| combine | back to summary |
|---|---|
| public PatternsRequestCondition combine(PatternsRequestCondition other) Implements org. Combine the patterns of the current and of the other instances as follows:
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(PatternsRequestCondition other, HttpServletRequest request) Implements org. Compare the two conditions based on the URL patterns they contain.
Patterns are compared one at a time, from top to bottom via
It is assumed that both instances have been obtained via
| |
| getContent | back to summary |
|---|---|
| protected Collection Implements abstract org. Doc from org. Return the discrete items a request condition is composed of. For example URL patterns, HTTP request methods, param expressions, etc.
| |
| getDirectPaths | back to summary |
|---|---|
| public Set Return the mapping paths that are not patterns.
| |
| getMatchingCondition | back to summary |
|---|---|
| public PatternsRequestCondition getMatchingCondition(HttpServletRequest request) Implements org. Checks if any of the patterns match the given request and returns an instance
that is guaranteed to contain matching patterns, sorted via
A matching pattern is obtained by making checks in the following order:
| |
| getMatchingPattern | back to summary |
|---|---|
private String getMatchingPattern(String pattern, String lookupPath)
| |
| getMatchingPatterns | back to summary |
|---|---|
| public List Find the patterns matching the given lookup path. Invoking this method should
yield results equivalent to those of calling | |
| getPatterns | back to summary |
|---|---|
| public Set | |
| getToStringInfix | back to summary |
|---|---|
| protected String getToStringInfix() Implements abstract org. Doc from org. The notation to use when printing discrete items of content. For example
| |
| hasPattern | back to summary |
|---|---|
| private static boolean hasPattern(String[] patterns) | |
| initPatterns | back to summary |
|---|---|
| private static Set | |
| isEmptyPathMapping | back to summary |
|---|---|
| public boolean isEmptyPathMapping() Whether the condition is the "" (empty path) mapping. | |