net.sourceforge.wurfl.core
Class GeneralWURFLEngine

java.lang.Object
  extended by com.scientiamobile.reloader.AbstractReloadableWURFLEngine
      extended by net.sourceforge.wurfl.core.GeneralWURFLEngine
All Implemented Interfaces:
ReloadableWURFLEngine, CustomizableWURFLEngine, WurflWebConstants, WURFLHolder, WURFLManager

public class GeneralWURFLEngine
extends AbstractReloadableWURFLEngine
implements WurflWebConstants

Main Engine Manager: it's self-configured, following the "Convention over Configuration" principle.
All sensible default collaborators are provided.
Nevertheless, you can customize them as you want.
Here are the collaborators you can declare:
wurflModel, matcherManager, markupResolver, capabilitiesHolderFactory, deviceProvider, cacheProvider, filterChain, chain, handlersFactory, userAgentNormalizerFactory, wurflService, also a custom wurflManager.

This Manager implements also the ReloadableWURFLHolder interface, basically to developers facility and to perform hot engine reloading.

See Also:
WurflWebConstants.WURFL_DEFAULT_LOCATION, WurflWebConstants.WURFL_HOLDER_KEY

Field Summary
 
Fields inherited from interface net.sourceforge.wurfl.core.web.WurflWebConstants
WURFL, WURFL_DEFAULT_LOCATION, WURFL_HOLDER_KEY, WURFL_HOLDER_KEY_PARAM, WURFL_PATCH
 
Constructor Summary
GeneralWURFLEngine(String root)
           
GeneralWURFLEngine(String rootPath, String... patchesPath)
           
GeneralWURFLEngine(WURFLResource root)
           
GeneralWURFLEngine(WURFLResource root, WURFLResource... patches)
           
GeneralWURFLEngine(WURFLResource root, WURFLResources patches)
           
 
Method Summary
 void applyPatches(String... patchesPath)
           
 void applyPatches(WURFLResource... patches)
           
 void applyPatches(WURFLResources patches)
           
 Device getDeviceForRequest(javax.servlet.http.HttpServletRequest request)
          Return a Device instance from HttpServletRequest instance.
 Device getDeviceForRequest(String userAgent)
          Return a Device instance from user-agent String.
 Device getDeviceForRequest(WURFLRequest request)
          Return a Device instance from WURFLRequest instance.
 EngineTarget getEngineTarget()
          Return the engine target
 WURFLManager getWURFLManager()
          Implementation to respect WURFLHolder contract.
 WURFLUtils getWURFLUtils()
          Return WURFLUtils instances.
 void init()
           
 void reload(String rootPath)
           
 void reload(String rootPath, String[] patchesPath)
          Reload WURFL data from given resources paths.
 void reload(WURFLResource root, WURFLResource... patches)
           
 void reload(WURFLResource root, WURFLResources patches)
          Reload WURFL data from given resources.
 void setCacheProvider(CacheProvider cacheProvider)
           
 void setCapabilitiesHolderFactory(CapabilitiesHolderFactory capabilitiesHolderFactory)
           
 void setDeviceProvider(DeviceProvider deviceProvider)
           
 void setEngineTarget(EngineTarget target)
           
 void setMarkupResolver(MarkupResolver markupResolver)
           
 void setUserAgentNormalizerFactory(UserAgentNormalizerFactory userAgentNormalizerFactory)
           
 void setUserAgentResolver(UserAgentResolver userAgentResolver)
           
 void setWurflRequestFactory(WURFLRequestFactory wurflRequestFactory)
           
 
Methods inherited from class com.scientiamobile.reloader.AbstractReloadableWURFLEngine
createNotNullWURFLResources, createResource, createResources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralWURFLEngine

public GeneralWURFLEngine(String root)

GeneralWURFLEngine

public GeneralWURFLEngine(WURFLResource root)
Parameters:
root -

GeneralWURFLEngine

public GeneralWURFLEngine(String rootPath,
                          String... patchesPath)

GeneralWURFLEngine

public GeneralWURFLEngine(WURFLResource root,
                          WURFLResource... patches)
Parameters:
root -
patches -

GeneralWURFLEngine

public GeneralWURFLEngine(WURFLResource root,
                          WURFLResources patches)
Parameters:
root -
patches -
Method Detail

reload

public void reload(String rootPath)
Specified by:
reload in interface ReloadableWURFLEngine

applyPatches

public void applyPatches(String... patchesPath)
Specified by:
applyPatches in interface ReloadableWURFLEngine

applyPatches

public void applyPatches(WURFLResource... patches)
Specified by:
applyPatches in interface ReloadableWURFLEngine

applyPatches

public void applyPatches(WURFLResources patches)
Specified by:
applyPatches in interface ReloadableWURFLEngine

reload

public void reload(String rootPath,
                   String[] patchesPath)
Description copied from interface: ReloadableWURFLEngine
Reload WURFL data from given resources paths.

Specified by:
reload in interface ReloadableWURFLEngine
Parameters:
rootPath - The WURFL main file path. Can't be null.
patchesPath - The WURFL patches paths. Can be null.

reload

public void reload(WURFLResource root,
                   WURFLResource... patches)

reload

public void reload(WURFLResource root,
                   WURFLResources patches)
Description copied from interface: ReloadableWURFLEngine
Reload WURFL data from given resources.

Specified by:
reload in interface ReloadableWURFLEngine
Parameters:
root - The WURFL main file resource. Can't be null.
patches - The WURFL patches resources. Can be null.

setMarkupResolver

public void setMarkupResolver(MarkupResolver markupResolver)
Specified by:
setMarkupResolver in interface CustomizableWURFLEngine

setCapabilitiesHolderFactory

public void setCapabilitiesHolderFactory(CapabilitiesHolderFactory capabilitiesHolderFactory)
Specified by:
setCapabilitiesHolderFactory in interface CustomizableWURFLEngine

setWurflRequestFactory

public void setWurflRequestFactory(WURFLRequestFactory wurflRequestFactory)
Specified by:
setWurflRequestFactory in interface CustomizableWURFLEngine

setUserAgentNormalizerFactory

public void setUserAgentNormalizerFactory(UserAgentNormalizerFactory userAgentNormalizerFactory)
Specified by:
setUserAgentNormalizerFactory in interface CustomizableWURFLEngine

setUserAgentResolver

public void setUserAgentResolver(UserAgentResolver userAgentResolver)
Specified by:
setUserAgentResolver in interface CustomizableWURFLEngine

setDeviceProvider

public void setDeviceProvider(DeviceProvider deviceProvider)
Specified by:
setDeviceProvider in interface CustomizableWURFLEngine

setCacheProvider

public void setCacheProvider(CacheProvider cacheProvider)
Specified by:
setCacheProvider in interface CustomizableWURFLEngine

getWURFLManager

public final WURFLManager getWURFLManager()
Implementation to respect WURFLHolder contract.

Specified by:
getWURFLManager in interface WURFLHolder
Returns:
wurflManager

getWURFLUtils

public final WURFLUtils getWURFLUtils()
Description copied from interface: WURFLHolder
Return WURFLUtils instances.

Specified by:
getWURFLUtils in interface WURFLHolder
Returns:
A WURFLUtils instance.

init

public void init()

getDeviceForRequest

public Device getDeviceForRequest(javax.servlet.http.HttpServletRequest request)
Description copied from interface: WURFLManager
Return a Device instance from HttpServletRequest instance.

Specified by:
getDeviceForRequest in interface WURFLManager
Parameters:
request - The HttpServletRequest to match.

getDeviceForRequest

public Device getDeviceForRequest(WURFLRequest request)
Description copied from interface: WURFLManager
Return a Device instance from WURFLRequest instance.

Specified by:
getDeviceForRequest in interface WURFLManager
Parameters:
request - The WURFLRequest to match.

getDeviceForRequest

public Device getDeviceForRequest(String userAgent)
Description copied from interface: WURFLManager
Return a Device instance from user-agent String.

Specified by:
getDeviceForRequest in interface WURFLManager
Parameters:
userAgent - The user-agent String to match.

getEngineTarget

public EngineTarget getEngineTarget()
Description copied from interface: WURFLManager
Return the engine target

Specified by:
getEngineTarget in interface WURFLManager
Returns:
the engine target

setEngineTarget

public void setEngineTarget(EngineTarget target)
Specified by:
setEngineTarget in interface WURFLManager


Copyright © 2012 ScientiaMobile Inc.. All Rights Reserved.