|
rewrite-config-servlet 2.0.0.Beta3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ocpsoft.rewrite.config.DefaultConditionBuilder
org.ocpsoft.rewrite.servlet.config.HttpCondition
org.ocpsoft.rewrite.servlet.config.UserAgent
public abstract class UserAgent
A Condition that inspects the value of HttpServletRequest.getHeader(String) "User-Agent"
| Constructor Summary | |
|---|---|
UserAgent()
|
|
| Method Summary | |
|---|---|
static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent |
isDesktop()
Create a Condition asserting that the user-agent is a non-mobile device. |
static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent |
isMobile()
Create a Condition asserting that the user-agent is a mobile device. |
static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent |
isTablet()
Create a Condition asserting that the user-agent is a tablet device. |
static UserAgent |
matches(String pattern)
Create a Condition asserting that the user-agent matches the given pattern. |
| Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpCondition |
|---|
evaluate, evaluateHttp |
| Methods inherited from class org.ocpsoft.rewrite.config.DefaultConditionBuilder |
|---|
and, andNot, or, orNot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserAgent()
| Method Detail |
|---|
public static UserAgent matches(String pattern)
Condition asserting that the user-agent matches the given pattern.
User agent expressions may be parameterized:
UserAgent.matches("BlackBerry PlayBook 3.4")
UserAgent.matches("BlackBerry PlayBook {version}")
UserAgent.matches("{agent}")
...
name - ParameterizedPattern matching the request parameter name.{@link HttpServletRequest#getParameterMap()}public static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent isMobile()
Condition asserting that the user-agent is a mobile device.
public static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent isTablet()
Condition asserting that the user-agent is a tablet device.
public static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent isDesktop()
Condition asserting that the user-agent is a non-mobile device.
|
rewrite-config-servlet 2.0.0.Beta3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||