|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packageorg.springframework.web.servlet.mvc.condition
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
A logical disjunction (' || ') request condition to match a request'Class ConsumesRequestCondition, constructor ConsumesRequestCondition(String[])ss'Content-Type' header to a list of media type expressions. Two kindsofof media type expressions are supported, which are describedinin RequestMapping.consumes() and RequestMapping.headers()where the header name is 'Content-Type'. Regardless of which syntaxisis used, the semantics are the same.@author Arjen Poutsma @author Rossen Stoyanchev @since 3.1
Creates a new instance from 0 or more "consumes" expressions. @param consumes expressions with the syntax describedClass ConsumesRequestCondition, constructor ConsumesRequestCondition(String[], String[])ininRequestMapping.consumes(); if 0 expressions are provided,the condition will match to every request.
Creates a new instance with "consumes" and "header" expressions.Class ConsumesRequestCondition, ConsumesRequestCondition combine(ConsumesRequestCondition)"Header" expressions where the header name is not 'Content-Type' or have no header value defined are ignored. If 0 expressions are providedinin total, the condition will match to every request @param consumes as described in RequestMapping.consumes() @param headers as described in RequestMapping.headers()
Returns the "other" instance if it has any expressions; returns "this"Class ConsumesRequestCondition, int compareTo(ConsumesRequestCondition, HttpServletRequest)instance otherwise. Practically that means a method-level "consumes"overrides a type-level "consumes" condition.
Returns:Class ConsumesRequestCondition, ConsumesRequestCondition getMatchingCondition(HttpServletRequest)
- 0 if the two conditions have the same number of expressions
- Less than 0 if "this" has more or more specific media type expressions
- Greater than 0 if "other" has more or more specific media type expressions
It is assumed that both instances have been obtained
viavia .getMatchingCondition(HttpServletRequest) and each instancecontainscontains the matching consumable media type expression only or is otherwise empty.
Checks if any of the contained media type expressions match thegivengivenrequest 'Content-Type' header and returns an instance that isguaranteedguaranteed to contain matching expressions only. The match is performed via MediaType.includes(MediaType).@param request the currentrequestrequest @return the same instance if the condition contains no expressions;or a new condition with matching expressions only;or {@code null} if no expressions match.
A logical disjunction (' || ') request condition that matches aClass PatternsRequestCondition, constructor PatternsRequestCondition(String[])requestrequest against a set of URL path patterns.@author Rossen Stoyanchev @since 3.1
Creates a new instance with the given URL patterns. Each pattern that is not empty and does not start with "/" isClass PatternsRequestCondition, constructor PatternsRequestCondition(String[], UrlPathHelper, PathMatcher, boolean, boolean)pre-pendedprepended with "/". @param patterns 0 or more URL patterns; if 0 the condition will match to every request.
Class PatternsRequestCondition, PatternsRequestCondition combine(PatternsRequestCondition)CreatesAdditionala new instanceconstructor withthe givenflagsURLforpatterns.usingEachsuffix patternthat is not empty and does not start with "/"(.*)isandpre-pendedtrailingwithslash"/"matches.@param patterns the URL patterns to use; if 0, the condition will match to every request.@param urlPathHelpera UrlPathHelperfor determining the lookup pathforof a request @param pathMatchera PathMatcherforpatternpathmatchingmatching with patterns @param useSuffixPatternMatch whether to enable matching by suffix (".*") @param useTrailingSlashMatch whether to match irrespective of a trailing slash
Returns a new instance with URL patterns from the current instance ("this")Class PatternsRequestCondition, int compareTo(PatternsRequestCondition, HttpServletRequest)andandthe "other" instance as follows:
- If there are patterns in both instances, combine the patterns in "this"
withwith the patterns in "other" using PathMatcher.combine(String, String).- If only one instance has patterns, use them.
- If neither instance has patterns, use an empty String (i.e. "").
Compare the two conditions based on the URL patterns they contain.Class PatternsRequestCondition, PatternsRequestCondition getMatchingCondition(HttpServletRequest)Patterns are compared one at a time, from top to bottomviavia PathMatcher.getPatternComparator(String). If allcomparedcompared patterns match equally, but one instance has more patterns, itisis considered a closer match.It is assumed that both instances have been obtained
viavia .getMatchingCondition(HttpServletRequest) to ensuretheythey contain only patterns that match the request and are sortedwithwith the best matches on top.
Checks if any of the patterns match the given request and returns aninstanceinstance that is guaranteed to contain matching patterns, sortedviavia PathMatcher.getPatternComparator(String).A matching pattern is obtained by making checks in the following order:
- Direct match
- Pattern match with ".*" appended if the pattern doesn't already contain a "."
- Pattern match
- Pattern match with "/" appended if the pattern doesn't already end in "/"
@param request the currentrequestrequest@return the same instance if the condition contains no patterns;or a new condition with sorted matching patterns;or {@code null} if no patterns match.
A logical disjunction (' || ') request condition to match a request's 'Accept' header to a list of media type expressions. Two kinds of media type expressionsClass ProducesRequestCondition, constructor ProducesRequestCondition(String[])areare supported, which are described in RequestMapping.produces() and RequestMapping.headers() where the header name is 'Accept'.Regardless of which syntax is used, the semantics are the same.@author Arjen Poutsma @author Rossen Stoyanchev @since 3.1
Creates a new instance fromClass ProducesRequestCondition, constructor ProducesRequestCondition(String[], String[])0 or more"produces" expressions. If 0 expressions are provided in total, this condition will match to any request. @param produces expressions withthesyntaxdescribed indefined by RequestMapping.produces()if 0 expressions are provided, the condition matches to every request
Creates a new instance with "produces" and "header" expressions. "Header" expressionsClass ProducesRequestCondition, ProducesRequestCondition combine(ProducesRequestCondition)where the header name is not 'Accept' or have no headervaluevalue defined are ignored.If 0 expressions are provided in total,thethis conditioncondition matcheswill match toeveryanyrequestrequest. @param produces expressions withthesyntaxdescribed indefined by RequestMapping.produces() @param headers expressions withthesyntaxdescribed indefined by RequestMapping.headers()
Returns the "other" instance if it has any expressions; returns "this"Class ProducesRequestCondition, int compareTo(ProducesRequestCondition, HttpServletRequest)instance otherwise. Practically that means a method-level "produces"overrides a type-level "produces" condition.
Compares this and another "produces" condition as follows:Class ProducesRequestCondition, ProducesRequestCondition getMatchingCondition(HttpServletRequest)
- Sort 'Accept' header media types by quality value via MediaType.sortByQualityValue(List) and iterate the list.
- Get the
lowestfirst index of matching media typesfromin each "produces"condition first matching with MediaType.equals(Object)andand then with MediaType.includes(MediaType).- If a lower index is found, the condition at that index wins.
- If both indexes are equal, the media types at the index
areare compared further with MediaType.SPECIFICITY_COMPARATOR.It is assumed that both instances have been obtained
viavia .getMatchingCondition(HttpServletRequest) and eachinstanceinstance contains the matching producible media type expression onlyoror is otherwise empty.
Checks if any of the contained media type expressions match thegivengivenrequest 'Content-Type' header and returns an instance that isguaranteedguaranteed to contain matching expressions only. The match is performed via MediaType.isCompatibleWith(MediaType).@param request the currentrequestrequest @return the same instance if there are no expressions;or a new condition with matching expressions;or {@code null} if no expressions match.
The contract for request conditions.Class RequestCondition, T combine(T)Request conditions can be combined via .combine(Object), matched
toto a request via .getMatchingCondition(HttpServletRequest), andcomparedcompared to each other via .compareTo(Object, HttpServletRequest) todeterminedeterminewhich matches a request more closely.@paramThe type of objects that this RequestCondition can be combinedcombined with compared to.@author Rossen Stoyanchev @author Arjen Poutsma @since 3.1
Defines the rules for combining this condition (i.e. the current instance)Class RequestCondition, int compareTo(T, HttpServletRequest)with another condition. For example combining type- and method-levellevel RequestMapping conditions.@param other the condition to combine with. @returnsreturn a request condition instance that is the result ofcombiningcombining the two condition instances.
Compares this condition to another condition in the contextClass RequestCondition, T getMatchingCondition(HttpServletRequest)ofofa specific request. This method assumes both instanceshavehave been obtained via .getMatchingCondition(HttpServletRequest)to ensure they have content relevant to current request only.
Checks if this condition matches the given request and returnsaa potentially new request condition with content tailored tothethe current request. For example a condition with URL patternsmightmight return a new condition that contains matching patternssortedsorted with best matching patterns on top.@return a condition instance in case of a match;or {@code null} if there is no match.
A holder for a RequestCondition useful when the type of theClass RequestConditionHolder, constructor RequestConditionHolder(RequestCondition<?>)heldrequestrequestcondition is not known ahead of time-, e.g. custom condition.SinceAnthis class is also an implementation of {@code RequestCondition}itself,a {@codeeffectivelyRequestConditionHolder}it decorates the held request conditionallowingand allows it to be combined andcomparedcompared with othercustomrequest conditionswhileinensuringa type and nullsafetysafe way.When two {@code RequestConditionHolder} instances are combined or compared with each other, it is expected the conditions they hold are of the
same type. If they are not, a ClassCastException is raised. @author Rossen Stoyanchev @since 3.1
Create a new holder to wrap the given request condition.Class RequestConditionHolder, RequestConditionHolder combine(RequestConditionHolder)@param requestCondition the condition to hold, may be {@code null}
Combine the request conditions held by the twoClass RequestConditionHolder, int compareTo(RequestConditionHolder, HttpServletRequest)RequestConditionHolderRequestConditionHolderinstances after making sure the conditions are of the same type. Or if one holder is empty, the other holder is returned.
Compare the request conditions held by the twoClass RequestConditionHolder, RequestConditionHolder getMatchingCondition(HttpServletRequest)RequestConditionHolderRequestConditionHolderinstances after making sure the conditions are of the same type. Or if one holder is empty, the other holder is preferred.
Get the matching condition for the held request condition wrap it inaanew RequestConditionHolder instance. Or otherwise if this is an empty holder, return the same holder instance.