Package lumis.portal.device
Class UaParserUtil
- java.lang.Object
-
- lumis.portal.device.UaParserUtil
-
public class UaParserUtil extends java.lang.Object
Utility class for using the UA parser library. LumisXP is using this to replace the use of WURFL library in some cases, but the stable IDeviceManager was not modified in anyway in this aspect. So this class is currently a internal LumisXP class that centralizes the use of the UA parser library.- Since:
- 17.0.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description UaParserUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getDeviceType(ua_parser.Device device)
Returns the device type categorization for a given device.static ua_parser.Client
parseClient(java.lang.String userAgent)
Returns the parsed client from the given user agent.
-
-
-
Method Detail
-
parseClient
public static ua_parser.Client parseClient(java.lang.String userAgent)
Returns the parsed client from the given user agent.- Parameters:
userAgent
- the user agent.- Returns:
- the parsed client.
- Since:
- 17.0.0
-
getDeviceType
public static java.lang.String getDeviceType(ua_parser.Device device)
Returns the device type categorization for a given device.- Parameters:
device
- the device.- Returns:
"tablet"
,"smartphone"
or"desktop"
.- Since:
- 17.0.0
-
-