Package com.microstrategy.web.app
Interface BrowserSettings
- 
- All Superinterfaces:
 EnumBrowserType
- All Known Implementing Classes:
 AbstractBrowserSettings,CookieBrowserSettings,GenericBrowserSettings,HttpBrowserSettings,PreferenceBrowserSettings
public interface BrowserSettings extends EnumBrowserType
This interface enables to access settings or preferences that have been defined outside thePreferencesinstance. Each setting may have been originated from one of several different sources (such as the URL query string, cookies, etc).- Since:
 - MicroStrategy Web 7.3.1 or earlier
 
 
- 
- 
Field Summary
- 
Fields inherited from interface com.microstrategy.web.objects.EnumBrowserType
BROWSER_TYPE_ANDROID, BROWSER_TYPE_CHROME, BROWSER_TYPE_EDGE, BROWSER_TYPE_FIREFOX, BROWSER_TYPE_FIREFOX_2, BROWSER_TYPE_FIREFOX_3, BROWSER_TYPE_FIREFOX_3_5, BROWSER_TYPE_IE, BROWSER_TYPE_IE_W3C, BROWSER_TYPE_IE10, BROWSER_TYPE_IE11, BROWSER_TYPE_IE6, BROWSER_TYPE_IE7, BROWSER_TYPE_IE8, BROWSER_TYPE_IE9, BROWSER_TYPE_NETSCAPE, BROWSER_TYPE_OTHER, BROWSER_TYPE_SAFARI, BROWSER_TYPE_UNKNOWN 
 - 
 
- 
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidclearHttpSessionValues()Clear http session browser settings.voidclearSessionBrowserSettings()Deprecated.voidclearSessionValues()Clear the session browser settings for current Intelligence Server session.voidclearSessionValues(WebIServerSession session)Clear the session browser settings for the given session.voidflush()Prepare all required headers so browser settings are sent back to the client as cookies.java.lang.StringgetBrowserCompatName()Returns the name of the IE browser including its status to indicate whether it is requesitng in Compatibility Mode.java.lang.StringgetBrowserName()Returns the name of the browser that is being used for performing the requestintgetBrowserType()Returns the type of the browser that is being used for performing the request being handled.intgetBrowserTypeAndVersion()Returns the type and the version of the browser that is being used for performing the requestjava.lang.StringgetBrowserVersion()Returns the numeric version of the browser that is being used.MarkupOutputgetDebugOut()Get the Debug Information into the outputjava.lang.StringgetDefaultValue(java.lang.String key)Return the default value of a specific setting if not found for the current user.BrowserSettingDefinitionListgetDefinitionList()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.java.lang.StringgetHttpSessionValue(java.lang.String keyName)Returns the http session value of the key sent as parameterjava.lang.StringgetLocale()Deprecated.Not used anymore.PreferencesgetPreferences()Get the Preferences instance currently assigned to this BrowserSettingsWebIServerSessiongetSession()Gets the session that is used as default when accessing session settings.java.lang.StringgetSessionValue(java.lang.String keyName)Returns the value of the key sent as parameter, related with the setting corresponding to the default sessionjava.lang.StringgetSessionValue(java.lang.String keyName, WebIServerSession session)Returns the value of the key sent as parameter, related with the setting corresponding to the indicated sessionjava.lang.StringgetUserAgent()Retrives the USER-AGENT string from the header of the browser.java.lang.StringgetValue(java.lang.String keyName)Returns the value of the key sent as parameterbooleanhasValueSet(java.lang.String keyName)Checks whether a value has been set for the given key name or notbooleanisCSS2Supported()Indicates if the browser currently used by the client can handle CSS 2 styles.booleanisDHTMLSupported()Indicates if the browser currently used by the client can handle DHTML content or not.booleanisEdgeModeEnabled()Get flag whether System Preference enables a tag or http header X-UA-COMPATIBLE to force IE browsers to render in highest Document Mode.voidsetDefinitionList(BrowserSettingDefinitionList bsDefinitionList)Sets the default definition of the browser setting.voidsetHttpSessionValue(java.lang.String keyName, java.lang.String value)Persists the specified http session value under the specified keyvoidsetIframeVisibility(java.lang.String value)Define a browser setting for allowing the IFrame to be shown on DHTML environments.voidsetPreferences(Preferences preferences)Set the Preferences instance to use for this BrowserSettings instancevoidsetSession(WebIServerSession currentSession)Sets the session that will be used as default when accessing session settings.voidsetSessionValue(java.lang.String keyName, java.lang.String value)Persists the specified value under the specified key for the default sessionvoidsetSessionValue(java.lang.String keyName, java.lang.String value, WebIServerSession session)Persists the specified value under the specified key for the indicated sessionvoidsetValue(java.lang.String keyName, java.lang.String value)Persists the specified value under the specified key 
 - 
 
- 
- 
Method Detail
- 
setSession
void setSession(WebIServerSession currentSession)
Sets the session that will be used as default when accessing session settings.- Parameters:
 currentSession- an initializedWebIServerSessioninstance that represents the current session opened.
 
- 
getSession
WebIServerSession getSession()
Gets the session that is used as default when accessing session settings.- Returns:
 - currentSession an initialized 
WebIServerSessioninstance that represents the current session opened. Returnsnullif none has been assigned to this BrowserSettings instance. 
 
- 
getValue
java.lang.String getValue(java.lang.String keyName)
Returns the value of the key sent as parameter- Parameters:
 keyName- the name associated with the value to return- Returns:
 - the value found under the specified key
 
 
- 
hasValueSet
boolean hasValueSet(java.lang.String keyName)
Checks whether a value has been set for the given key name or not- Parameters:
 keyName- the name associated with the setting- Returns:
 - true if there is a value been set already (other than the default)
 - Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getHttpSessionValue
java.lang.String getHttpSessionValue(java.lang.String keyName)
Returns the http session value of the key sent as parameter- Parameters:
 keyName- the name associated with the value to return- Returns:
 - the value found under the specified key
 
 
- 
getSessionValue
java.lang.String getSessionValue(java.lang.String keyName)
Returns the value of the key sent as parameter, related with the setting corresponding to the default session- Parameters:
 keyName- the name associated with the value to return- Returns:
 - the value found under the specified key
 
 
- 
getSessionValue
java.lang.String getSessionValue(java.lang.String keyName, WebIServerSession session)Returns the value of the key sent as parameter, related with the setting corresponding to the indicated session- Parameters:
 keyName- the name associated with the value to returnsession- an initializedWebIServerSessioninstance- Returns:
 - the value found under the specified key, for the specified session
 
 
- 
setValue
void setValue(java.lang.String keyName, java.lang.String value)Persists the specified value under the specified key- Parameters:
 keyName- name under to which the new setting will be savedvalue- value of the setting to be saved
 
- 
setHttpSessionValue
void setHttpSessionValue(java.lang.String keyName, java.lang.String value)Persists the specified http session value under the specified key- Parameters:
 keyName- name under to which the new setting will be savedvalue- value of the setting to be saved
 
- 
setSessionValue
void setSessionValue(java.lang.String keyName, java.lang.String value)Persists the specified value under the specified key for the default session- Parameters:
 keyName- name under to which the new setting will be savedvalue- value of the setting to be saved
 
- 
setSessionValue
void setSessionValue(java.lang.String keyName, java.lang.String value, WebIServerSession session)Persists the specified value under the specified key for the indicated session- Parameters:
 keyName- name under to which the new setting will be savedvalue- value of the setting to be savedsession- an initializedWebIServerSessioninstance
 
- 
getBrowserType
int getBrowserType()
Returns the type of the browser that is being used for performing the request being handled.- Returns:
 - a value depending on the type of browser used by the client:
 
BROWSER_TYPE_NETSCAPEBROWSER_TYPE_IEBROWSER_TYPE_OTHER 
 
- 
getBrowserTypeAndVersion
int getBrowserTypeAndVersion()
Returns the type and the version of the browser that is being used for performing the request- Returns:
 - a value depending on the type of browser used by the client. For example: 
 
BROWSER_TYPE_IE6BROWSER_TYPE_FIREFOX_3BROWSER_TYPE_SAFARI_4 - Since:
 - MicroStrategy Web 9.0.1
 
 
- 
getBrowserName
java.lang.String getBrowserName()
Returns the name of the browser that is being used for performing the request- Returns:
 - a value depending on the type and version of browser used by the client. supported browser names: ie7, ie8, ie9, ie10, firefox, chrome, safari; otherwise: unsupported-browser.
 
 
- 
getBrowserCompatName
java.lang.String getBrowserCompatName()
Returns the name of the IE browser including its status to indicate whether it is requesitng in Compatibility Mode.- Returns:
 - a value depending on the type and version of browser used by the client. supported browser compat names: ie8c, ie9c, ie10c otherwise: ""
 
 
- 
getBrowserVersion
java.lang.String getBrowserVersion()
Returns the numeric version of the browser that is being used. ie. 1.5, 6, 7- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
isDHTMLSupported
boolean isDHTMLSupported()
Indicates if the browser currently used by the client can handle DHTML content or not.- Returns:
 - a 
booleanvalue indicating if the client browser can display and handle DHTML code. 
 
- 
isCSS2Supported
boolean isCSS2Supported()
Indicates if the browser currently used by the client can handle CSS 2 styles.- Returns:
 - a 
booleanvalue indicating if the client browser can display and handle CSS 2 styles. 
 
- 
getUserAgent
java.lang.String getUserAgent()
Retrives the USER-AGENT string from the header of the browser.- Returns:
 - a 
Stringvalue indicating USER-AGENT string from the header of the browser - Since:
 - MicroStrategy Web 8.0.0
 
 
- 
getLocale
@Deprecated java.lang.String getLocale()
Deprecated.Not used anymore. UsegetSession()to get the display locale instead.Get the locale value saved as browser setting- Returns:
 - the localeId available for this BrowserSettings instance.
 
 
- 
setPreferences
void setPreferences(Preferences preferences)
Set the Preferences instance to use for this BrowserSettings instance- Parameters:
 preferences- a validPreferencesinstance
 
- 
getPreferences
Preferences getPreferences()
Get the Preferences instance currently assigned to this BrowserSettings- Returns:
 - a 
Preferencesinstance 
 
- 
clearSessionBrowserSettings
@Deprecated void clearSessionBrowserSettings()
Deprecated.Clear the session browser settings for current Intelligence Server session. 
- 
clearSessionValues
void clearSessionValues()
Clear the session browser settings for current Intelligence Server session.- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
clearSessionValues
void clearSessionValues(WebIServerSession session)
Clear the session browser settings for the given session.- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
flush
void flush()
Prepare all required headers so browser settings are sent back to the client as cookies. This is an utility method that gives better performance, allowing to prepare these headers only once, instead of each time a browser setting value is changed. For best results, the automaticFlush flag should be off when creating the BrowserSettings instance. 
- 
setDefinitionList
void setDefinitionList(BrowserSettingDefinitionList bsDefinitionList)
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.- Parameters:
 bsDefinitionList- the default definition of the browser settings
 
- 
getDefinitionList
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.- Returns:
 - the 
BrowserSettingDefinitionListinstance of the browser setting. 
 
- 
getDefaultValue
java.lang.String getDefaultValue(java.lang.String key)
Return the default value of a specific setting if not found for the current user. Returns an empty string if the definition of the setting was not found on the definition list.- Parameters:
 key- the name of the browser setting.- Returns:
 - the default value of a specific setting
 
 
- 
setIframeVisibility
void setIframeVisibility(java.lang.String value)
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.- Parameters:
 value- String value of a boolean indicating if the IFrame should be shown.- Since:
 - MicroStrategy Web 8.0.0
 
 
- 
clearHttpSessionValues
void clearHttpSessionValues()
Clear http session browser settings.- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getDebugOut
MarkupOutput getDebugOut()
Get the Debug Information into the output- Returns:
 - an instance of 
MarkupOutput. - Since:
 - MicroStrategy Web 9.0.3
 
 
- 
isEdgeModeEnabled
boolean isEdgeModeEnabled()
Get flag whether System Preference enables a tag or http header X-UA-COMPATIBLE to force IE browsers to render in highest Document Mode.- Returns:
 - boolean
 
 
 - 
 
 -