public class DefaultDetectionService extends Object implements DetectionService
DetectionService.DesktopNegatives, DetectionService.DesktopStrings, DetectionService.IPhoneStrings| Constructor and Description |
|---|
DefaultDetectionService() |
| Modifier and Type | Method and Description |
|---|---|
String |
getBrand(String userAgent)
Gets the brand.
|
protected DeviceResolver |
getDeviceResolver() |
String |
getMobileScreenSize(String userAgent)
Gets the mobile screen size.
|
String |
getModel(String userAgent)
Gets the model.
|
boolean |
isBot(String userAgent)
Checks if is bot.
|
boolean |
isDesktop(String userAgent)
Checks if is desktop.
|
boolean |
isiPhoneCapable(String userAgent,
List<String> accepts)
Checks if is i phone capable.
|
boolean |
isMobileDevice(String userAgent)
Checks if is mobile device.
|
boolean |
isWmlCapable(String useragent,
List<String> accepts)
Checks if is wml capable.
|
boolean |
isXhtmlCapable(String userAgent,
List<String> accepts)
Checks if is xhtml capable.
|
void |
setDeviceResolver(DeviceResolver deviceResolver) |
public void setDeviceResolver(DeviceResolver deviceResolver)
deviceResolver - the deviceResolver to setprotected DeviceResolver getDeviceResolver()
public String getBrand(String userAgent)
DetectionServicegetBrand in interface DetectionServiceuserAgent - the user agentpublic String getMobileScreenSize(String userAgent)
DetectionServicegetMobileScreenSize in interface DetectionServiceuserAgent - the user agentpublic String getModel(String userAgent)
DetectionServicegetModel in interface DetectionServiceuserAgent - the user agentpublic boolean isiPhoneCapable(String userAgent, List<String> accepts)
DetectionServiceisiPhoneCapable in interface DetectionServiceuserAgent - the user agentaccepts - the acceptspublic boolean isBot(String userAgent)
DetectionServiceisBot in interface DetectionServiceuserAgent - the user agentpublic boolean isDesktop(String userAgent)
DetectionServiceisDesktop in interface DetectionServiceuserAgent - the user agentpublic boolean isMobileDevice(String userAgent)
DetectionServiceisMobileDevice in interface DetectionServiceuserAgent - the user agentpublic boolean isWmlCapable(String useragent, List<String> accepts)
DetectionServiceisWmlCapable in interface DetectionServiceuseragent - the useragentaccepts - the acceptspublic boolean isXhtmlCapable(String userAgent, List<String> accepts)
DetectionServiceisXhtmlCapable in interface DetectionServiceuserAgent - the user agentaccepts - the acceptsCopyright © 2017 SAP SE. All Rights Reserved.