Package org.opencms.jsp.util
Class CmsJspDeviceSelector
java.lang.Object
org.opencms.jsp.util.CmsJspDeviceSelector
- All Implemented Interfaces:
I_CmsJspDeviceSelector
This class provides the detection for different devices, so that the
<cms:device type="...">
-Tag can detect which device sends the HTTP request.- Since:
- 8.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant for desktop detection.static final String
Constant for mobile detection.The list of types supported by this device selector implementation.Fields inherited from interface org.opencms.jsp.util.I_CmsJspDeviceSelector
REQUEST_ATTRIBUTE_DEVICE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDeviceType
(javax.servlet.http.HttpServletRequest req) Returns the name of the device type.Returns an array of device types that can be detected.Returns the User Agent info.
-
Field Details
-
C_DESKTOP
Constant for desktop detection.- See Also:
-
C_MOBILE
Constant for mobile detection.- See Also:
-
TYPES
The list of types supported by this device selector implementation.
-
-
Constructor Details
-
CmsJspDeviceSelector
public CmsJspDeviceSelector()
-
-
Method Details
-
getDeviceType
Description copied from interface:I_CmsJspDeviceSelector
Returns the name of the device type.This will be one option in
I_CmsJspDeviceSelector.getDeviceTypes()
.- Specified by:
getDeviceType
in interfaceI_CmsJspDeviceSelector
- Parameters:
req
- the HTTP servlet request to process- Returns:
- the name of the device type
- See Also:
-
getDeviceTypes
Description copied from interface:I_CmsJspDeviceSelector
Returns an array of device types that can be detected.- Specified by:
getDeviceTypes
in interfaceI_CmsJspDeviceSelector
- Returns:
- an array of device types that can be detected
- See Also:
-
getUserAgentInfo
Returns the User Agent info.- Returns:
- the information about the user agent
-