Generated by
JDiff

org.springframework.web.servlet.mvc.condition Documentation Differences

This file contains all the changes in documentation in the package org.springframework.web.servlet.mvc.condition as colored differences. Deletions are shown like 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.

Class ConsumesRequestCondition

A logical disjunction (' || ') request condition to match a request'ss 'Content-Type' header to a list of media type expressions. Two kinds of of media type expressions are supported, which are described in in RequestMapping.consumes() and RequestMapping.headers() where the header name is 'Content-Type'. Regardless of which syntax is is used, the semantics are the same. @author Arjen Poutsma @author Rossen Stoyanchev @since 3.1
Class ConsumesRequestCondition, constructor ConsumesRequestCondition(String[])

Creates a new instance from 0 or more "consumes" expressions. @param consumes expressions with the syntax described inin RequestMapping.consumes(); if 0 expressions are provided, the condition will match to every request.
Class ConsumesRequestCondition, constructor ConsumesRequestCondition(String[], String[])

Creates a new instance with "consumes" and "header" expressions. "Header" expressions where the header name is not 'Content-Type' or have no header value defined are ignored. If 0 expressions are provided in in total, the condition will match to every request @param consumes as described in RequestMapping.consumes() @param headers as described in RequestMapping.headers()
Class ConsumesRequestCondition, ConsumesRequestCondition combine(ConsumesRequestCondition)

Returns the "other" instance if it has any expressions; returns "this" instance otherwise. Practically that means a method-level "consumes" overrides a type-level "consumes" condition.
Class ConsumesRequestCondition, int compareTo(ConsumesRequestCondition, HttpServletRequest)

Returns:

It is assumed that both instances have been obtained via via .getMatchingCondition(HttpServletRequest) and each instance contains contains the matching consumable media type expression only or is otherwise empty.

Class ConsumesRequestCondition, ConsumesRequestCondition getMatchingCondition(HttpServletRequest)

Checks if any of the contained media type expressions match the givengiven request 'Content-Type' header and returns an instance that is guaranteed guaranteed to contain matching expressions only. The match is performed via MediaType.includes(MediaType). @param request the current request request @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.

Class PatternsRequestCondition

A logical disjunction (' || ') request condition that matches a request request against a set of URL path patterns. @author Rossen Stoyanchev @since 3.1
Class PatternsRequestCondition, constructor PatternsRequestCondition(String[])

Creates a new instance with the given URL patterns. Each pattern that is not empty and does not start with "/" is pre-pendedprepended with "/". @param patterns 0 or more URL patterns; if 0 the condition will match to every request.
Class PatternsRequestCondition, constructor PatternsRequestCondition(String[], UrlPathHelper, PathMatcher, boolean, boolean)

CreatesAdditional a new instanceconstructor with the givenflags URLfor patterns. using Eachsuffix pattern that is not empty and does not start with "/"(.*) isand pre-pendedtrailing withslash "/"matches. @param patterns the URL patterns to use; if 0, the condition will match to every request. @param urlPathHelper a UrlPathHelper for determining the lookup path forof a request @param pathMatcher a PathMatcher for pattern path matching matching with patterns @param useSuffixPatternMatch whether to enable matching by suffix (".*") @param useTrailingSlashMatch whether to match irrespective of a trailing slash
Class PatternsRequestCondition, PatternsRequestCondition combine(PatternsRequestCondition)

Returns a new instance with URL patterns from the current instance ("this") andand the "other" instance as follows:
Class PatternsRequestCondition, int compareTo(PatternsRequestCondition, HttpServletRequest)

Compare the two conditions based on the URL patterns they contain. Patterns are compared one at a time, from top to bottom via via PathMatcher.getPatternComparator(String). If all compared compared patterns match equally, but one instance has more patterns, it is is considered a closer match.

It is assumed that both instances have been obtained via via .getMatchingCondition(HttpServletRequest) to ensure they they contain only patterns that match the request and are sorted with with the best matches on top.

Class PatternsRequestCondition, PatternsRequestCondition getMatchingCondition(HttpServletRequest)

Checks if any of the patterns match the given request and returns an instance instance that is guaranteed to contain matching patterns, sorted via via PathMatcher.getPatternComparator(String).

A matching pattern is obtained by making checks in the following order:

@param request the current request request @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.

Class ProducesRequestCondition

A logical disjunction (' || ') request condition to match a request's 'Accept' header to a list of media type expressions. Two kinds of media type expressions are are 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
Class ProducesRequestCondition, constructor ProducesRequestCondition(String[])

Creates a new instance from 0 or more "produces" expressions. If 0 expressions are provided in total, this condition will match to any request. @param produces expressions with the syntax described indefined by RequestMapping.produces() if 0 expressions are provided, the condition matches to every request
Class ProducesRequestCondition, constructor ProducesRequestCondition(String[], String[])

Creates a new instance with "produces" and "header" expressions. "Header" expressions where the header name is not 'Accept' or have no header valuevalue defined are ignored. If 0 expressions are provided in total, thethis condition condition matcheswill match to everyany request request. @param produces expressions with the syntax described indefined by RequestMapping.produces() @param headers expressions with the syntax described indefined by RequestMapping.headers()
Class ProducesRequestCondition, ProducesRequestCondition combine(ProducesRequestCondition)

Returns the "other" instance if it has any expressions; returns "this" instance otherwise. Practically that means a method-level "produces" overrides a type-level "produces" condition.
Class ProducesRequestCondition, int compareTo(ProducesRequestCondition, HttpServletRequest)

Compares this and another "produces" condition as follows:
  1. Sort 'Accept' header media types by quality value via MediaType.sortByQualityValue(List) and iterate the list.
  2. Get the first index of matching media types in each "produces" condition first matching with MediaType.equals(Object) and and then with MediaType.includes(MediaType).
  3. If a lower index is found, the condition at that index wins.
  4. If both indexes are equal, the media types at the index are are compared further with MediaType.SPECIFICITY_COMPARATOR.

It is assumed that both instances have been obtained via via .getMatchingCondition(HttpServletRequest) and each instanceinstance contains the matching producible media type expression only or or is otherwise empty.

Class ProducesRequestCondition, ProducesRequestCondition getMatchingCondition(HttpServletRequest)

Checks if any of the contained media type expressions match the givengiven request 'Content-Type' header and returns an instance that is guaranteed guaranteed to contain matching expressions only. The match is performed via MediaType.isCompatibleWith(MediaType). @param request the current request request @return the same instance if there are no expressions; or a new condition with matching expressions; or {@code null} if no expressions match.

Class RequestCondition

The contract for request conditions.

Request conditions can be combined via .combine(Object), matched to to a request via .getMatchingCondition(HttpServletRequest), and compared compared to each other via .compareTo(Object, HttpServletRequest) to determinedetermine which matches a request more closely. @param The type of objects that this RequestCondition can be combined combined with compared to. @author Rossen Stoyanchev @author Arjen Poutsma @since 3.1

Class RequestCondition, T combine(T)

Defines the rules for combining this condition (i.e. the current instance) with another condition. For example combining type- and method-level level RequestMapping conditions. @param other the condition to combine with. @returnsreturn a request condition instance that is the result of combining combining the two condition instances.
Class RequestCondition, int compareTo(T, HttpServletRequest)

Compares this condition to another condition in the context ofof a specific request. This method assumes both instances have have been obtained via .getMatchingCondition(HttpServletRequest) to ensure they have content relevant to current request only.
Class RequestCondition, T getMatchingCondition(HttpServletRequest)

Checks if this condition matches the given request and returns a a potentially new request condition with content tailored to the the current request. For example a condition with URL patterns might might return a new condition that contains matching patterns sorted sorted with best matching patterns on top. @return a condition instance in case of a match; or {@code null} if there is no match.

Class RequestConditionHolder

A holder for a RequestCondition useful when the type of the held request request condition is not known ahead of time -, e.g. custom condition. AnSince this class is also an implementation of {@code RequestCondition} itself, a {@codeeffectively RequestConditionHolder}it decorates the held request condition allowing and allows it to be combined and comparedcompared with other custom request conditions while ensuringin a type and null safetysafe 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


Class RequestMethodsRequestCondition

A logical disjunction (' || ') request condition that matches a request request against a set of RequestMethods. @author Arjen Poutsma @author Rossen Stoyanchev @since 3.1
Class RequestMethodsRequestCondition, constructor RequestMethodsRequestCondition(RequestMethod[])

Create a new instance with the given request methods. @param requestMethods 0 or more HTTP request methods; if, 0 the condition will match to every request.
Class RequestMethodsRequestCondition, RequestMethodsRequestCondition combine(RequestMethodsRequestCondition)

Returns a new instance with a union of the HTTP request methodsmethods from "this" and the "other" instance.
Class RequestMethodsRequestCondition, int compareTo(RequestMethodsRequestCondition, HttpServletRequest)

Returns:

It is assumed that both instances have been obtained via via .getMatchingCondition(HttpServletRequest) and therefore each instance instance contains the matching HTTP request method only or is otherwise empty.

Class RequestMethodsRequestCondition, RequestMethodsRequestCondition getMatchingCondition(HttpServletRequest)

ChecksCheck if any of the HTTP request methods match the given request andand returns return an instance that contains the matching HTTP request method only. @param request the current request @return the same instance if the condition contains no request method; is orempty, a new condition withwith the matchingmatched request method; , or or {@code null} if no request methods match.