java.lang.Object | |
↳ | com.microstrategy.web.app.GenericBrowserSettings |
![]() |
![]() |
This abstract class represents a generic implementation of the BrowserSettings interface.
It provides with implementation of methods that can be used on other BrowserSettings
child classes. Some of these methods are the ones
that provide a cache system for the values (addCacheValue()
,
getCacheValue()
, etc); others for values related to the Query String and
Form Data (buildBrowserSettingURLParameter()
,
getValueFromQueryString()
, etc); and generic methods for finding out information
about the client browser that made a request (isDHTMLSupported()
,
getBrowserType()
, etc)
As mentioned above, this implementation provides a cache system that can be used
transparently by the classes that extend this implementation. It is assumed that the
values saved under the main keys are with URL-like format, for example:
key1=subkey1=value1&subkey2=value2
This formatting is completely hidden if using the cache methods. If the cache does not exist
then the updateCacheValue() method can be directly used and this one will create the cache and
will provide the URL-like string required to be saved as the value of a cookie, a preference, or
any other.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | GENERIC_HTTP_SESSION_KEY | Primary key to use for representing global temporal browser setting values | |||||||||
String | GENERIC_KEY | Primary key to use for representing global persistent browser setting values | |||||||||
String | GENERIC_PROJECT_KEY_PREFIX | key name prefix for project settings * |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected ContainerServices | _containerServices | Instance of ContainerServices to be used for accessing the values of Form, Query String
and cookies |
|||||||||
protected WebIServerSession | _session | Instance of WebIServerSession related with the BrowserSettings currently processed |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GenericBrowserSettings()
Class Constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getBrowserCompatName()
Returns the name of the IE browser including its status to indicate whether it is requesitng in Compatibility Mode.
| ||||||||||
String |
getBrowserName()
Returns the name of the browser that is being used for performing the request
| ||||||||||
int |
getBrowserType()
Returns the type of the browser that is being used for performing the request being
handled.
| ||||||||||
int |
getBrowserTypeAndVersion()
Returns the type and the version of the browser
| ||||||||||
String |
getBrowserVersion()
Returns the numeric version of the browser that is being used.
| ||||||||||
MarkupOutput |
getDebugOut()
Get the Debug Information into the output
| ||||||||||
String |
getDefaultValue(String key)
Return the default value of a specific setting.
| ||||||||||
BrowserSettingDefinitionList |
getDefinitionList()
Return the default definition of the browser setting which
will be use to determine the value of the browser settings in case the setting
requested is not found for the user.
| ||||||||||
String |
getLocale()
Get the locale value saved as browser setting
| ||||||||||
Preferences |
getPreferences()
Get the Preferences instance currently assigned to this BrowserSettings
| ||||||||||
WebIServerSession |
getSession()
Gets the session that is used as default when accessing session settings.
| ||||||||||
String |
getUserAgent()
Retrives the USER-AGENT string from the header of the browser.
| ||||||||||
boolean |
hasValueSet(String keyName)
Checks whether a value has been set for the given key name or not
| ||||||||||
boolean |
isCSS2Supported()
Indicates if the browser currently used by the client can handle CSS 2 styles.
| ||||||||||
boolean |
isDHTMLSupported()
Indicates if the browser currently used by the client can handle DHTML content or
not.
| ||||||||||
boolean |
isEdgeModeEnabled()
Get flag whether System Preference enables a tag to force IE browsers to render in highest Document Mode.
| ||||||||||
void |
setDefinitionList(BrowserSettingDefinitionList bsDefinitionList)
Sets the default definition of the browser setting.
| ||||||||||
void |
setIframeVisibility(String value)
Define a browser setting for allowing the IFrame to be shown on DHTML environments.
| ||||||||||
void |
setPreferences(Preferences preferences)
Set the Preferences instance to use for this BrowserSettings instance
| ||||||||||
void |
setSession(WebIServerSession currentSession)
Sets the session that will be used as default when accessing session settings.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addCacheValue(String key, String value, boolean persistable)
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
void |
addCacheValue(String key, String value)
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
Enumeration |
getCacheNames()
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
String |
getCacheValue(String key)
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
String |
getCacheValue(String key, String subkey)
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
String |
getValueFromQueryString(String keyName, String subKeyName)
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
boolean |
isCacheValueModified(String key)
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
boolean |
isCacheValuePersistable(String key)
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
boolean |
isValueCached(String key)
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
boolean |
isValueSafeForXSS(String key, String value)
Check if the value is safe for XSS, which means check the value contains valid HTML tag or not
| ||||||||||
void |
setCacheValuePersistable(String key, boolean persistable)
This method is deprecated.
it is only used by deprecated classes.
| ||||||||||
String |
updateCacheValue(String key, String subkey, String newValue)
This method is deprecated.
it is only used by deprecated classes.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Primary key to use for representing global temporal browser setting values
Primary key to use for representing global persistent browser setting values
key name prefix for project settings *
Instance of ContainerServices
to be used for accessing the values of Form, Query String
and cookies
Instance of WebIServerSession
related with the BrowserSettings currently processed
Class Constructor. Initializes an empty instance of the class.
Returns the name of the IE browser including its status to indicate whether it is requesitng in Compatibility Mode.
Returns the name of the browser that is being used for performing the request
Returns the type of the browser that is being used for performing the request being handled.
int
value depending on the type of browser used by the client:
BROWSER_TYPE_NETSCAPE
BROWSER_TYPE_IE
BROWSER_TYPE_OTHER
Returns the type and the version of the browser
int
value depending on the type of browser defined in BrowserSettings
.Returns the numeric version of the browser that is being used. ie. 1.5, 6, 7
Get the Debug Information into the output
MarkupOutput
.Return the default value of a specific setting. Returns an null if the definition of the setting was not found on the definition list.
key | the name of the browser setting. |
---|
Return the default definition of the browser setting which will be use to determine the value of the browser settings in case the setting requested is not found for the user.
Get the locale value saved as browser setting
Get the Preferences instance currently assigned to this BrowserSettings
Preferences
instance
Gets the session that is used as default when accessing session settings.
WebIServerSession
instance that
represents the current session opened.
Retrives the USER-AGENT string from the header of the browser.
String
value indicating USER-AGENT string from the header of the browserChecks whether a value has been set for the given key name or not
keyName | the name associated with the setting |
---|
Indicates if the browser currently used by the client can handle CSS 2 styles.
boolean
value indicating if the client browser can display
and handle CSS 2 styles.
Indicates if the browser currently used by the client can handle DHTML content or not.
boolean
value indicating if the client browser can display
and handle DHTML code.
Get flag whether System Preference enables a tag to force IE browsers to render in highest Document Mode.
Sets the default definition of the browser setting. This definition object will be use to determine the value of the browser settings in case the setting requested is not found for the user.
bsDefinitionList | the default definition of the browser settings |
---|
Define a browser setting for allowing the IFrame to be shown on DHTML environments. A request for hidding the IFrame has precedence over one for showing it.
value | String value of a boolean indicating if the IFrame should be shown. |
---|
Set the Preferences instance to use for this BrowserSettings instance
preferences | a valid Preferences instance
|
---|
Sets the session that will be used as default when accessing session settings.
currentSession | an initialized WebIServerSession instance that
represents the current session opened.
|
---|
This method is deprecated.
it is only used by deprecated classes.
Adds the indicated value under the given key on the cache.
key | Key to use for the value to store |
---|---|
value | Value to save in the cache. |
persistable | indicates if the browser setting is temporal or permanent |
This method is deprecated.
it is only used by deprecated classes.
Adds the indicated value under the given key on the cache. By default it will be considered that the browser setting related is temporal.
key | Key to use for the value to store |
---|---|
value | Value to save in the cache. |
This method is deprecated.
it is only used by deprecated classes.
Return an enumeration of all the keys used in the cache.
Enumeration
with all the key names saved in the cache
This method is deprecated.
it is only used by deprecated classes.
Obtains the value of the given key if stored on the cache
key | Key to search for in the cache |
---|
This method is deprecated.
it is only used by deprecated classes.
Obtains the value of the given key-subkey pair if stored on the cache.
key | Key to search for in the cache |
---|---|
subkey | Subkey to search for in the cache contents |
This method is deprecated.
it is only used by deprecated classes.
Based on the key and subkey given, search this value on the URL and on the Form Data
keyName | key to look for |
---|---|
subKeyName | subkey to look for |
null
is returned.
This method is deprecated.
it is only used by deprecated classes.
Determines if the cache value has been modified since it was initially loaded.
key | Key to search for in the cache |
---|
True
if the value has been modified from its original value. Otherwise (or if
value is not found) returns False
This method is deprecated.
it is only used by deprecated classes.
Determines if the cache value related with the key given is a persistable browser setting or not
key | Key to search for in the cache |
---|
True
if the cache value is related to a persistent browser setting. Otherwise
(or if not found) returns False
This method is deprecated.
it is only used by deprecated classes.
Determines if the key sent as parameter is already contained in the cache or not
key | key to search for in the cache |
---|
True
if the value is contained in the cache, otherwise returns
False
Check if the value is safe for XSS, which means check the value contains valid HTML tag or not
key | Key to use for the value |
---|---|
value | Value to be checked |
This method is deprecated.
it is only used by deprecated classes.
Sets if the cache value related with the key given is a persistable browser setting or not. If the value is not found, nothing is done.
key | Key to search for in the cache |
---|---|
persistable | True if the cache value will be related to a persistent browser setting. Otherwise,
False |
This method is deprecated.
it is only used by deprecated classes.
Update the value under the given key-subkey combination on the cache
key | key to search for in the cache |
---|---|
subkey | subkey to search for in the cache value |
newValue | new value that the key-subkey combination will have |