|
spring-webmvc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.web.servlet.mvc.condition.AbstractRequestCondition<CompositeRequestCondition>
org.springframework.web.servlet.mvc.condition.CompositeRequestCondition
public class CompositeRequestCondition
Implements the RequestCondition contract by delegating to multiple
RequestCondition types and using a logical conjunction (' && ') to
ensure all conditions match a given request.
When CompositeRequestCondition instances are combined or compared
they are expected to (a) contain the same number of conditions and (b) that
conditions in the respective index are of the same type. It is acceptable to
provide null conditions or no conditions at all to the constructor.
| Constructor Summary | |
|---|---|
CompositeRequestCondition(RequestCondition<?>... requestConditions)
Create an instance with 0 or more RequestCondition types. |
|
| Method Summary | |
|---|---|
CompositeRequestCondition |
combine(CompositeRequestCondition other)
If one instance is empty, return the other. |
int |
compareTo(CompositeRequestCondition other,
javax.servlet.http.HttpServletRequest request)
If one instance is empty, the other "wins". |
java.util.List<RequestCondition<?>> |
getConditions()
Return the underlying conditions, possibly empty but never null. |
protected java.util.Collection<?> |
getContent()
Return the discrete items a request condition is composed of. |
CompositeRequestCondition |
getMatchingCondition(javax.servlet.http.HttpServletRequest request)
Delegate to all contained conditions to match the request and return the resulting "matching" condition instances. |
protected java.lang.String |
getToStringInfix()
The notation to use when printing discrete items of content. |
boolean |
isEmpty()
Whether this instance contains 0 conditions or not. |
| 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 |
| Constructor Detail |
|---|
public CompositeRequestCondition(RequestCondition<?>... requestConditions)
RequestCondition types. It is
important to create CompositeRequestCondition instances with the
same number of conditions so they may be compared and combined.
It is acceptable to provide null conditions.
| Method Detail |
|---|
public boolean isEmpty()
public java.util.List<RequestCondition<?>> getConditions()
null.
protected java.util.Collection<?> getContent()
AbstractRequestCondition
getContent in class AbstractRequestCondition<CompositeRequestCondition>nullprotected java.lang.String getToStringInfix()
AbstractRequestCondition
getToStringInfix in class AbstractRequestCondition<CompositeRequestCondition>public CompositeRequestCondition combine(CompositeRequestCondition other)
other - the condition to combine with.
public CompositeRequestCondition getMatchingCondition(javax.servlet.http.HttpServletRequest request)
An empty CompositeRequestCondition matches to all requests.
null if there is no match.
public int compareTo(CompositeRequestCondition other,
javax.servlet.http.HttpServletRequest request)
|
spring-webmvc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||