rewrite-config-servlet 2.0.0.Alpha2

org.ocpsoft.rewrite.servlet.config
Class UserAgent

java.lang.Object
  extended by org.ocpsoft.rewrite.config.DefaultConditionBuilder
      extended by org.ocpsoft.rewrite.servlet.config.HttpCondition
          extended by org.ocpsoft.rewrite.servlet.config.UserAgent
All Implemented Interfaces:
Condition, ConditionBuilder, ConfigurationElement

public abstract class UserAgent
extends HttpCondition

A Condition that inspects the value of ServletRequest.getScheme()

Author:
Lincoln Baxter, III

Constructor Summary
UserAgent()
           
 
Method Summary
static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent isDesktop()
          Condition asserting that the user-agent is a non-mobile device.
static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent isMobile()
          Condition asserting that the user-agent is a mobile device.
static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent isTablet()
          Condition asserting that the user-agent is a tablet device.
static UserAgent matches(String pattern)
          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, create, or, orNot, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAgent

public UserAgent()
Method Detail

matches

public static UserAgent matches(String pattern)
Condition asserting that the user-agent matches the given pattern. (May be parameterized using {param} expressions.)


isMobile

public static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent isMobile()
Condition asserting that the user-agent is a mobile device.


isTablet

public static org.ocpsoft.rewrite.servlet.config.UserAgent.ClassificationUserAgent isTablet()
Condition asserting that the user-agent is a tablet device.


isDesktop

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.Alpha2

Copyright © 2012 OCPsoft. All Rights Reserved.