|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.http.BrowserInfo
This class stores information about the actual browser capabilities.
Field Summary | |
private static BrowserInfo |
defaultSettings
This is the default client Settings class that is used in the following cases There is no valid user session object available No client Settings object was registered in the user session |
static java.lang.String |
KEY_JSCRIPT
Java Script (boolean) |
static java.lang.String |
KEY_JSVERSION
Java Script Version (double) |
private java.util.Map |
properties
Browser Properties |
private static long |
serialVersionUID
Serial Version UID |
Constructor Summary | |
BrowserInfo()
Constructor |
Method Summary | |
static BrowserInfo |
get(javax.servlet.http.HttpSession session)
Retrieves the current client settings from the user session. |
static BrowserInfo |
get(javax.servlet.jsp.PageContext pageContext)
Retrieves the current client settings from the user session. |
double |
getJavaScriptVersion()
retrieve the supported Javascript Version |
java.lang.String |
getProperty(java.lang.String key)
Retrieves a named property |
boolean |
isJavaScriptEnabled()
Check if JavaScript is enabled for the users session |
static BrowserInfo |
parse(java.lang.String encoded)
Parses browser information from an encoded string |
static void |
set(javax.servlet.http.HttpSession session,
BrowserInfo info)
Stores the Setting object in the users session |
static void |
set(javax.servlet.jsp.PageContext pageContext,
BrowserInfo info)
Stores the Setting object in the users session |
static boolean |
setFromRequest(javax.servlet.http.HttpServletRequest request)
Sets the browser information from a hidden field. |
static boolean |
setFromRequest(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Sets the browser information from a hidden field. |
void |
setProperty(java.lang.String key,
java.lang.String value)
sets the value for a named property |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
public static final java.lang.String KEY_JSCRIPT
public static final java.lang.String KEY_JSVERSION
private static BrowserInfo defaultSettings
private java.util.Map properties
Constructor Detail |
public BrowserInfo()
Method Detail |
public static BrowserInfo parse(java.lang.String encoded)
encoded
- A String encoded list with the Browser information
public void setProperty(java.lang.String key, java.lang.String value)
key
- The Property Name. This can be one of the KEY_xxx Constantsvalue
- The property value or null
public java.lang.String getProperty(java.lang.String key)
key
- The Property Name. This can be one of the KEY_xxx Constants
null
public static BrowserInfo get(javax.servlet.jsp.PageContext pageContext)
pageContext
- JSP Page Context
public static BrowserInfo get(javax.servlet.http.HttpSession session)
session
- A valid user session
public static void set(javax.servlet.jsp.PageContext pageContext, BrowserInfo info)
pageContext
- JSP Page Contextinfo
- BroserInfo objectpublic static void set(javax.servlet.http.HttpSession session, BrowserInfo info)
session
- A valid user sessioninfo
- BroserInfo objectpublic static boolean setFromRequest(javax.servlet.http.HttpServletRequest request)
This method needs a valid user session to store the BrowserInfo object.
request
- HttpServletRequest
true
if a browser information object was
createdpublic static boolean setFromRequest(javax.servlet.http.HttpServletRequest request, java.lang.String name)
This method needs a valid user session to store the BrowserInfo object.
request
- HttpServletRequestname
- the name of the hidden field that stores the browser
information.
true
if a browser information object was
createdpublic boolean isJavaScriptEnabled()
true
if Javascript is enabledpublic double getJavaScriptVersion()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |