org.springframework.mobile.device.wurfl
Class WurflDevice

java.lang.Object
  extended by org.springframework.mobile.device.wurfl.WurflDevice
All Implemented Interfaces:
net.sourceforge.wurfl.core.Device

public class WurflDevice
extends java.lang.Object
implements Device, net.sourceforge.wurfl.core.Device

WURFL-based Device implementation. Also implements net.sourceforge.wurfl.core.Device, exposing the full capabilities of the WURFL API.


Constructor Summary
WurflDevice(net.sourceforge.wurfl.core.Device device)
           
 
Method Summary
 java.util.Map getCapabilities()
           
 java.lang.String getCapability(java.lang.String name)
           
 java.lang.String getId()
           
 net.sourceforge.wurfl.core.MarkUp getMarkUp()
           
 java.lang.String getUserAgent()
           
 boolean isMobile()
          True if this device is a mobile device such as an Apple iPhone or an Nexus One Android.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WurflDevice

public WurflDevice(net.sourceforge.wurfl.core.Device device)
Method Detail

isMobile

public boolean isMobile()
Description copied from interface: Device
True if this device is a mobile device such as an Apple iPhone or an Nexus One Android. Could be used by a pre-handle interceptor to redirect the user to a dedicated mobile web site. Could be used to apply a different page layout or stylesheet when the device is a mobile device.


getId

public java.lang.String getId()
Specified by:
getId in interface net.sourceforge.wurfl.core.Device

getUserAgent

public java.lang.String getUserAgent()
Specified by:
getUserAgent in interface net.sourceforge.wurfl.core.Device

getCapability

public java.lang.String getCapability(java.lang.String name)
                               throws net.sourceforge.wurfl.core.CapabilityNotDefinedException
Specified by:
getCapability in interface net.sourceforge.wurfl.core.Device
Throws:
net.sourceforge.wurfl.core.CapabilityNotDefinedException

getCapabilities

public java.util.Map getCapabilities()
Specified by:
getCapabilities in interface net.sourceforge.wurfl.core.Device

getMarkUp

public net.sourceforge.wurfl.core.MarkUp getMarkUp()
Specified by:
getMarkUp in interface net.sourceforge.wurfl.core.Device

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object