public class CmsJspDeviceSelectorTablet extends java.lang.Object implements I_CmsJspDeviceSelector
<cms:device type="...">
-Tag can detect
which kind of device type sends the HTTP request.This implementation detects smart phones and tablets as mobile devices.
CmsJspDeviceSelector detects only
smart phones as mobile devices
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
C_DESKTOP
Constant for desktop detection.
|
static java.lang.String |
C_MOBILE
Constant for mobile detection.
|
static java.util.List<java.lang.String> |
TYPES
The list of types supported by this device selector implementation.
|
REQUEST_ATTRIBUTE_DEVICE
Constructor and Description |
---|
CmsJspDeviceSelectorTablet() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDeviceType(javax.servlet.http.HttpServletRequest req)
Returns the name of the device type.
|
java.util.List<java.lang.String> |
getDeviceTypes()
Returns an array of device types that can be detected.
|
UAgentInfo |
getUserAgentInfo()
Returns the User Agent info.
|
public static final java.lang.String C_DESKTOP
public static final java.lang.String C_MOBILE
public static final java.util.List<java.lang.String> TYPES
public CmsJspDeviceSelectorTablet()
public java.lang.String getDeviceType(javax.servlet.http.HttpServletRequest req)
I_CmsJspDeviceSelector
This will be one option in I_CmsJspDeviceSelector.getDeviceTypes()
.
getDeviceType
in interface I_CmsJspDeviceSelector
req
- the HTTP servlet request to processI_CmsJspDeviceSelector.getDeviceType(javax.servlet.http.HttpServletRequest)
public java.util.List<java.lang.String> getDeviceTypes()
I_CmsJspDeviceSelector
getDeviceTypes
in interface I_CmsJspDeviceSelector
I_CmsJspDeviceSelector.getDeviceTypes()
public UAgentInfo getUserAgentInfo()