com.endeca.mobile.services.detection.impl
Class DeviceAtlasDeviceDetector

java.lang.Object
  extended by com.endeca.mobile.services.detection.impl.DefaultDeviceDetector
      extended by com.endeca.mobile.services.detection.impl.DeviceAtlasDeviceDetector
All Implemented Interfaces:
DeviceDetector

public class DeviceAtlasDeviceDetector
extends DefaultDeviceDetector


Constructor Summary
DeviceAtlasDeviceDetector()
          Constructor for use with xml based configuration like Spring.
DeviceAtlasDeviceDetector(org.springframework.core.io.Resource deviceAtlasFileResource)
           
 
Method Summary
 org.springframework.core.io.Resource getDeviceAtlasFileResource()
           
 boolean isMobile(java.lang.String userAgent)
           
 DeviceInfo lookupDevice(java.lang.String userAgent)
           
 void setDeviceAtlasFileResource(org.springframework.core.io.Resource deviceAtlasFileResource)
           
 
Methods inherited from class com.endeca.mobile.services.detection.impl.DefaultDeviceDetector
getExcludeUrls, getIncludeUrls, isTablet, redirectURL, redirectURL, setExcludeUrls, setIncludeUrls
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceAtlasDeviceDetector

public DeviceAtlasDeviceDetector()
Constructor for use with xml based configuration like Spring. If you use this constructor, you need to call setDeviceAtlasFileResource before using the DeviceDetector instance


DeviceAtlasDeviceDetector

public DeviceAtlasDeviceDetector(org.springframework.core.io.Resource deviceAtlasFileResource)
                          throws mobi.mtld.da.exception.JsonException,
                                 java.io.IOException
Throws:
mobi.mtld.da.exception.JsonException
java.io.IOException
Method Detail

lookupDevice

public DeviceInfo lookupDevice(java.lang.String userAgent)
Specified by:
lookupDevice in interface DeviceDetector
Overrides:
lookupDevice in class DefaultDeviceDetector

isMobile

public boolean isMobile(java.lang.String userAgent)
Specified by:
isMobile in interface DeviceDetector
Overrides:
isMobile in class DefaultDeviceDetector

getDeviceAtlasFileResource

public org.springframework.core.io.Resource getDeviceAtlasFileResource()

setDeviceAtlasFileResource

public void setDeviceAtlasFileResource(org.springframework.core.io.Resource deviceAtlasFileResource)
                                throws mobi.mtld.da.exception.JsonException,
                                       java.io.IOException
Throws:
mobi.mtld.da.exception.JsonException
java.io.IOException