com.nitido.nimbox.http.enhanced
Class DeviceHandler
java.lang.Object
com.nitido.nimbox.http.enhanced.DeviceHandler
- All Implemented Interfaces:
- EnhancedDispatcherConstants
public class DeviceHandler
- extends java.lang.Object
- implements EnhancedDispatcherConstants
Determines the preferred markup language based on wurfl file and/or rules file.
The handler requires configurations to specify the location of wurfl file
,wurfl web patch as well as default skin.
DeviceHandler configuration:
Contains the configurations needed to retrieve the preferred markup language
for a given request.
- com.nitido.nimbox.http.skinsetting.device.wurfl =/home/myuser/wurfl.xml>
(constant is EnhancedDispatcherConstants.CONF_KEY_WURFL_URL) - the location of
wurfl file. If missing or invalid wurfl file then wurfl step for checking
the markup language is disabled.
- com.nitido.nimbox.http.skinsetting.device.webpatchwurfl=/home/myuser/wurfl_patch.xml
(constant is EnhancedDispatcherConstants.FOR_WEB_PATCH_WURFL_URL) - the location of
web patch for wurfl file. If missing or invalid wurfl web patch file then
wurfl markup language checking is disabled.
- com.nitido.nimbox.http.skinsetting.rules.location=/home/myuser/rules.xml
(constant is EnhancedDispatcherConstants.CONF_KEY_RULES_LOCATION) - the location of
rules file. If missing, invalid or contains a document
which does not follows the expected XML Schema rules.xsd then the rules
checking is disabled.
- com.nitido.nimbox.http.skinsetting.skin.default=html
(constant is EnhancedDispatcherConstants.CONF_KEY_DEFAULT_SKIN_TYPE) - the default
skin type. If missing or empty the "html" is assigned as default skin type.
Fields inherited from interface com.nitido.nimbox.http.enhanced.EnhancedDispatcherConstants |
ACCEPT, ALLOF, ANYOF, CONF_KEY_DEFAULT_LOCALE, CONF_KEY_DEFAULT_SKIN_TYPE, CONF_KEY_LOCALE_KEYS, CONF_KEY_RULES_LOCATION, CONF_KEY_SKIN_PATH_LAYOUT, CONF_KEY_WEB_PATCH_WURFL_URL, CONF_KEY_WURFL_URL, CONTAINS, DEFAULT_SKIN_TYPE, DOM_NODE_PROP, EXTERNAL_NONAMESPACE_SCHEMA_LOCATION_PROP, GENERIC_DEVICE_ID, HTML_VER_3_2, HTML_VER_4_0, IF, IF_CONDITIONAL, IHTML_VER_1_0, IHTML_VER_2_0, IHTML_VER_3_0, IHTML_VER_4_0, IHTML_VER_5_0, IS, IXHTML_VER_1_0, KEY_CLIENT_PROFILE, KEY_LOCALE, LOCALE_EN, MARKUP_TYPE, MARKUP_VERSION_TYPE, NAMESPACE_PREFIXES_FEATURE, SCHEMA_FULL_CHECKING_FEATURE, SCHEMA_VALIDATION_FEATURE, STARTS_WITH, TAG_CONDITION, TAG_EXPRESSION, TAG_HTTP_HEADER, TAG_MATCH_HOLDER, TAG_RELATION, TAG_RESULT, TAG_RESULT_TYPE, TAG_RESULT_VALUE, TAG_RULE, USER_AGENT, VALIDATION_FEATURE, WML_VER_1_1, WML_VER_1_2, WML_VER_1_3, WURFL_KEY_COLUMNS, WURFL_KEY_MAX_DECK_SIZE, WURFL_KEY_MAX_IMAGE_HEIGHT, WURFL_KEY_MAX_IMAGE_WIDTH, WURFL_KEY_MAX_OBJECT_SIZE, WURFL_KEY_MAX_URL_LENGTH_CACHED_PAGE, WURFL_KEY_MAX_URL_LENGTH_IN_REQUEST, WURFL_KEY_PREFERRED_MARKUP, WURFL_KEY_RESOLUTION_HEIGHT, WURFL_KEY_RESOLUTION_WIDTH, WURFL_KEY_ROWS, XHTML_VER_BASIC, XHTML_VER_MP_1_0 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static DeviceHandler getInstance(java.util.HashMap setting)
- Return singleton instance to the device handler object identified
by the given fileName.
- Parameters:
setting
- The settings that has been passed to the EnhacnedDispatcher
This method expects to find the configuration for the key
EnhancedDispatcherConstants.CONF_KEY_RULES_LOCATION in the setting
HashMap.
- Returns:
- Instance of device handler for the given fileName.
getClientProfile
public ClientProfile getClientProfile(javax.servlet.http.HttpServletRequest request)
- Returns the skin type for the request.
The skin type retrieving is done in 3 steps:
- 1.If the wurfl checking is enabled then get the
preferred skin type from wurfl file.
- 2.If the skin type is unknown after step2 this method is trying to
retrive the skin type from a rule file defined in configuration.
- 3.If skin type is still unknown assigns the default skin type.
This method allways returns a skin type.
- Parameters:
request
- Reference to the HttpServletRequest object with all the parameters
associated with the request sent from the client.
- Returns:
- A skin type wich represents the preferred markup for the request.
getLocaleHandler
public LocaleHandler getLocaleHandler()
These JavaDoc pages are generated for release/nim_2_5-2.5.44 Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.