com.free2be.dimensions.device.simple
Class SimpleDeviceFactory

java.lang.Object
  extended by com.free2be.dimensions.device.DeviceFactory
      extended by com.free2be.dimensions.device.simple.SimpleDeviceFactory

public class SimpleDeviceFactory
extends DeviceFactory


Nested Class Summary
 
Nested classes/interfaces inherited from class com.free2be.dimensions.device.DeviceFactory
DeviceFactory.ConfidenceLevel
 
Field Summary
 
Fields inherited from class com.free2be.dimensions.device.DeviceFactory
CONTENT, DEFAULT, DEVICE, MINIMUM_LEVEL_FOR_FINAL, MODEL, NONE, OVERRIDE, PRE_DETERMINED, STANDARD
 
Constructor Summary
SimpleDeviceFactory()
           
 
Method Summary
static void assignAccept(java.lang.String acceptValue, SimpleDevice device)
           
protected  void assignDeviceAttributesFromAccept(java.lang.String acceptHeaderValue)
           
static SimpleDevice buildHtmlDevice()
          Temporary builders until detection is integrated..
static SimpleDevice buildHtmlFirefoxDevice()
           
static SimpleDevice buildHtmlIeDevice()
           
static SimpleDevice buildHtmlMozillaDevice()
           
static SimpleDevice buildHtmlNetscapeDevice()
           
static SimpleDevice buildHtmlPdaDevice()
          Temporary builders until detection is integrated..
static SimpleDevice buildHtmlPhoneDevice()
          Temporary builders until detection is integrated..
static SimpleDevice buildJ2meDevice()
           
static SimpleDevice buildPcBrowserDevice()
           
static SimpleDevice buildPocketPcDevice(javax.servlet.http.HttpServletRequest request)
          Temporary builders until detection is integrated..
static SimpleDevice buildWmlDevice()
           
static SimpleDevice buildWmlDevice(javax.servlet.http.HttpServletRequest request)
          Temporary builders until detection is integrated..
protected  SimpleDevice detectDevice(javax.servlet.http.HttpServletRequest request)
           
protected  SimpleDevice detectJ2meDevice(javax.servlet.http.HttpServletRequest request)
           
protected  SimpleDevice detectPcBrowserDevice(javax.servlet.http.HttpServletRequest request)
           
protected  SimpleDevice detectPocketPcDevice(javax.servlet.http.HttpServletRequest request)
           
protected  SimpleDevice detectWmlDevice(javax.servlet.http.HttpServletRequest request)
           
 DeviceFactory.ConfidenceLevel getConfidenceLevel()
          Retrieves the confidence level this factory has in fulfilling the request based on the information provided during intialization.
 Device getDevice()
          Retrieves a device to represent the calling client's device.
 DeviceFactory.ConfidenceLevel getHighestConfidenceLevel()
          Returns the highest confidence level the implementing device factory can provide.
protected  void initialize(java.lang.Object informationSource)
          initalizes a factory after default construction giving some object as the source of information to determine confidence and build devices.
 
Methods inherited from class com.free2be.dimensions.device.DeviceFactory
clearPersistantDevice, getDeviceFactory, getFactories, getPersistentFactories
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDeviceFactory

public SimpleDeviceFactory()
Method Detail

getDevice

public Device getDevice()
Description copied from class: DeviceFactory
Retrieves a device to represent the calling client's device.

Specified by:
getDevice in class DeviceFactory

assignDeviceAttributesFromAccept

protected void assignDeviceAttributesFromAccept(java.lang.String acceptHeaderValue)

detectDevice

protected SimpleDevice detectDevice(javax.servlet.http.HttpServletRequest request)

detectPcBrowserDevice

protected SimpleDevice detectPcBrowserDevice(javax.servlet.http.HttpServletRequest request)

detectPocketPcDevice

protected SimpleDevice detectPocketPcDevice(javax.servlet.http.HttpServletRequest request)

detectWmlDevice

protected SimpleDevice detectWmlDevice(javax.servlet.http.HttpServletRequest request)

detectJ2meDevice

protected SimpleDevice detectJ2meDevice(javax.servlet.http.HttpServletRequest request)

buildHtmlDevice

public static SimpleDevice buildHtmlDevice()
Temporary builders until detection is integrated..


buildPcBrowserDevice

public static SimpleDevice buildPcBrowserDevice()

buildHtmlIeDevice

public static SimpleDevice buildHtmlIeDevice()

buildHtmlNetscapeDevice

public static SimpleDevice buildHtmlNetscapeDevice()

buildHtmlFirefoxDevice

public static SimpleDevice buildHtmlFirefoxDevice()

buildHtmlMozillaDevice

public static SimpleDevice buildHtmlMozillaDevice()

buildJ2meDevice

public static SimpleDevice buildJ2meDevice()

buildHtmlPdaDevice

public static SimpleDevice buildHtmlPdaDevice()
Temporary builders until detection is integrated..


buildPocketPcDevice

public static SimpleDevice buildPocketPcDevice(javax.servlet.http.HttpServletRequest request)
Temporary builders until detection is integrated..


buildHtmlPhoneDevice

public static SimpleDevice buildHtmlPhoneDevice()
Temporary builders until detection is integrated..


buildWmlDevice

public static SimpleDevice buildWmlDevice()

buildWmlDevice

public static SimpleDevice buildWmlDevice(javax.servlet.http.HttpServletRequest request)
Temporary builders until detection is integrated..


assignAccept

public static void assignAccept(java.lang.String acceptValue,
                                SimpleDevice device)

getConfidenceLevel

public DeviceFactory.ConfidenceLevel getConfidenceLevel()
Description copied from class: DeviceFactory
Retrieves the confidence level this factory has in fulfilling the request based on the information provided during intialization.

Specified by:
getConfidenceLevel in class DeviceFactory

getHighestConfidenceLevel

public DeviceFactory.ConfidenceLevel getHighestConfidenceLevel()
Description copied from class: DeviceFactory
Returns the highest confidence level the implementing device factory can provide. This method should be considered a static method and return a value upon empty construction.

Specified by:
getHighestConfidenceLevel in class DeviceFactory

initialize

protected void initialize(java.lang.Object informationSource)
Description copied from class: DeviceFactory
initalizes a factory after default construction giving some object as the source of information to determine confidence and build devices. The majority of the work should be done during this method since this is the method that should determine the actual confidence of building a device. No exception should ever be thrown from this. Any internal exceptions should simply return a confidence level of NONE when asked.

Specified by:
initialize in class DeviceFactory
Parameters:
informationSource - any object that a factory may use to determine device (usually javax.servlet.HttpServletRequest).