public Device detectDevice(HttpServletRequest request) { WURFLManager wurflManager = _wurflHolderImpl.getWURFLManager(); if (wurflManager == null) { if (_log.isWarnEnabled()) { _log.warn("WURFL database has not initialized"); } return UnknownDevice.getInstance(); } net.sourceforge.wurfl.core.Device wurflDevice = wurflManager.getDeviceForRequest(request); Device device = null; if (wurflDevice != null) { Map<String, String> capabilities = wurflDevice.getCapabilities(); if ((capabilities != null) && !capabilities.isEmpty()) { device = new WURFLDevice(capabilities, _deviceCapabilityFilter); } else { device = UnknownDevice.getInstance(); } } return device; }
public MarkUp getMarkUp() { return device.getMarkUp(); }
@SuppressWarnings("rawtypes") public Map getCapabilities() { return device.getCapabilities(); }
public String getCapability(String name) throws CapabilityNotDefinedException { return device.getCapability(name); }
public String getUserAgent() { return device.getUserAgent(); }
public String getId() { return device.getId(); }
public boolean isActualDeviceRoot() { return device.isActualDeviceRoot(); }
public String getDeviceRootId() { return device.getDeviceRootId(); }