|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.mvc.condition.AbstractRequestCondition<ParamsRequestCondition> org.springframework.web.servlet.mvc.condition.ParamsRequestCondition
public final class ParamsRequestCondition
A logical conjunction (' && ') request condition that matches a request against
a set parameter expressions with syntax defined in RequestMapping.params()
.
Nested Class Summary | |
---|---|
(package private) static class |
ParamsRequestCondition.ParamExpression
Parses and matches a single param expression to a request. |
Field Summary | |
---|---|
private java.util.Set<ParamsRequestCondition.ParamExpression> |
expressions
|
Constructor Summary | |
---|---|
private |
ParamsRequestCondition(java.util.Collection<ParamsRequestCondition.ParamExpression> conditions)
|
|
ParamsRequestCondition(java.lang.String... params)
Create a new instance from the given param expressions. |
Method Summary | |
---|---|
ParamsRequestCondition |
combine(ParamsRequestCondition other)
Returns a new instance with the union of the param expressions from "this" and the "other" instance. |
int |
compareTo(ParamsRequestCondition other,
HttpServletRequest request)
Returns: 0 if the two conditions have the same number of parameter expressions Less than 1 if "this" instance has more parameter expressions Greater than 1 if the "other" instance has more parameter expressions |
protected java.util.Collection<ParamsRequestCondition.ParamExpression> |
getContent()
Return the discrete items a request condition is composed of. |
java.util.Set<NameValueExpression<java.lang.String>> |
getExpressions()
Return the contained request parameter expressions. |
ParamsRequestCondition |
getMatchingCondition(HttpServletRequest request)
Returns "this" instance if the request matches all param expressions; or null otherwise. |
protected java.lang.String |
getToStringInfix()
The notation to use when printing discrete items of content. |
private static java.util.Collection<ParamsRequestCondition.ParamExpression> |
parseExpressions(java.lang.String... params)
|
Methods inherited from class org.springframework.web.servlet.mvc.condition.AbstractRequestCondition |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final java.util.Set<ParamsRequestCondition.ParamExpression> expressions
Constructor Detail |
---|
public ParamsRequestCondition(java.lang.String... params)
params
- expressions with syntax defined in RequestMapping.params()
;
if 0, the condition will match to every request.private ParamsRequestCondition(java.util.Collection<ParamsRequestCondition.ParamExpression> conditions)
Method Detail |
---|
private static java.util.Collection<ParamsRequestCondition.ParamExpression> parseExpressions(java.lang.String... params)
public java.util.Set<NameValueExpression<java.lang.String>> getExpressions()
protected java.util.Collection<ParamsRequestCondition.ParamExpression> getContent()
AbstractRequestCondition
getContent
in class AbstractRequestCondition<ParamsRequestCondition>
null
protected java.lang.String getToStringInfix()
AbstractRequestCondition
getToStringInfix
in class AbstractRequestCondition<ParamsRequestCondition>
public ParamsRequestCondition combine(ParamsRequestCondition other)
other
- the condition to combine with.public ParamsRequestCondition getMatchingCondition(HttpServletRequest request)
null
otherwise.
null
if there is no match.public int compareTo(ParamsRequestCondition other, HttpServletRequest request)
It is assumed that both instances have been obtained via
getMatchingCondition(HttpServletRequest)
and each instance
contains the matching parameter expressions only or is otherwise empty.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |