public class

HttpBrowserSettings

extends GenericBrowserSettings
java.lang.Object
   ↳ com.microstrategy.web.app.GenericBrowserSettings
     ↳ com.microstrategy.web.app.HttpBrowserSettings

This class is deprecated.
Use CookieBrowserSettings instead.

Class Overview

This class represents an implementation of the BrowserSettings interface. The values of the settings this class has access to come from cookies saved on the user's computer or the URL query string. For being able to set and retrieve these values successfully, the ContainerServices is required by the constructor. When asked to set a setting, it will be saved as a cookie with the specified name (key). When requesting a value, it will first try to retrieve it from the URL; if not found there, it will try to get its value from the cookies.

The different BrowserSettings available through this class can be defined as: Generic settings:
=> Values will be found on the URL as parameters if they were generated by the buildBrowserSettingURLParameter() method
=> Values can be saved when using the setValue(keyName, value) method. => Values can be retrieved using the getValue(keyName) method.

Project settings:
These are the settings that are directly related with a user IServer session. The values are stored as temporal cookies on the client machine, meaning they will disappear once the browser session is ended.
=> Values can be saved when using the setSessionValue(keyName, value) method, once the current session has been specified by using the setSession() method. => Values can also be saved if using the setSessionValue(keyName, value, session) method, for specifying the session this value is related to, if different from the current session => Values can be retrieved using the getSessionValue(keyName) method.

Temporal settings:
These settings are also temporal but are not related with any IServer user session.
=> Values can be saved when using the setHttpSessionValue(keyName, value) method. => Values can be retrieved using the getHttpSessionValue(keyName) method.

Retrieving values from cookie is transparent to users since they get properly formatted when calling the different setValue() methods.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.GenericBrowserSettings
From interface com.microstrategy.web.objects.EnumBrowserType
[Expand]
Inherited Fields
From class com.microstrategy.web.app.GenericBrowserSettings
Public Constructors
HttpBrowserSettings(BrowserSettingDefinitionList bsDefinitionList, ContainerServices containerServices)
Class Constructor.
HttpBrowserSettings(BrowserSettingDefinitionList bsDefinitionList, ContainerServices containerServices, boolean usePermanentCookies)
Class Constructor.
HttpBrowserSettings(BrowserSettingDefinitionList bsDefinitionList, ContainerServices containerServices, boolean processBrowserSettings, boolean usePermanentCookies)
Class Constructor.
HttpBrowserSettings(BrowserSettingDefinitionList bsDefinitionList, ContainerServices containerServices, boolean processBrowserSettings, boolean usePermanentCookies, boolean automaticFlush)
Class Constructor.
Public Methods
void clearHttpSessionValues()
void clearSessionBrowserSettings()
void clearSessionValues()
void clearSessionValues(WebIServerSession session)
void flush()
Prepare all required headers so browser settings are sent back to the client as cookies.
String getHttpSessionValue(String keyName)
Returns the http session value of the key sent as parameter
String getSessionValue(String keyName)
Returns the value of the key sent as parameter, related with the setting corresponding to the default session
String getSessionValue(String keyName, WebIServerSession session)
Returns the value of the key sent as parameter, related with the setting corresponding to the indicated session
String getValue(String keyName)
Returns the value of the key sent as parameter
void setHttpSessionValue(String keyName, String value)
Persists the specified http session value under the specified key.
void setSessionValue(String keyName, String value)
Persists the specified value under the specified key for the default session
void setSessionValue(String keyName, String value, WebIServerSession session)
Persists the specified value under the specified key for the indicated session
void setValue(String keyName, String value)
Persists the specified value under the specified key.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.GenericBrowserSettings
From class java.lang.Object
From interface com.microstrategy.web.app.BrowserSettings

Public Constructors

public HttpBrowserSettings (BrowserSettingDefinitionList bsDefinitionList, ContainerServices containerServices)

Class Constructor. This requires a non-null Container Services object for this feature. By default automaticFlush, processBrowserSettings and usePermanentCookies are set to True

Parameters
bsDefinitionList an the BrowserSettingDefinitionList object from the PageManager object containing the default values of the spplication's browser settings.
containerServices an initialized instance of ContainerServices

public HttpBrowserSettings (BrowserSettingDefinitionList bsDefinitionList, ContainerServices containerServices, boolean usePermanentCookies)

Class Constructor. This requires a non-null Container Services object for this feature. By default automaticFlush and processBrowserSettings are set to True

Parameters
bsDefinitionList an the BrowserSettingDefinitionList object from the PageManager object containing the default values of the spplication's browser settings.
containerServices an initialized instance of ContainerServices
usePermanentCookies boolean that indicates if the browser setting information should be saved in permanent or temporary cookies.

public HttpBrowserSettings (BrowserSettingDefinitionList bsDefinitionList, ContainerServices containerServices, boolean processBrowserSettings, boolean usePermanentCookies)

Class Constructor. This requires a non-null Container Services object for this feature. By default automaticFlush is set to True

Parameters
bsDefinitionList an the BrowserSettingDefinitionList object from the PageManager object containing the default values of the spplication's browser settings.
containerServices an initialized instance of ContainerServices
processBrowserSettings boolean that indicates wheather the browser setting information located on the URL should be processed automatically or not.
usePermanentCookies boolean that indicates if the browser setting information should be saved in permanent or temporary cookies.

public HttpBrowserSettings (BrowserSettingDefinitionList bsDefinitionList, ContainerServices containerServices, boolean processBrowserSettings, boolean usePermanentCookies, boolean automaticFlush)

Class Constructor. This requires a non-null Container Services object for this feature.

Parameters
bsDefinitionList an the BrowserSettingDefinitionList object from the PageManager object containing the default values of the spplication's browser settings.
containerServices an initialized instance of ContainerServices
processBrowserSettings boolean that indicates wheather the browser setting information located on the URL should be processed automatically or not.
usePermanentCookies boolean that indicates if the browser setting information should be saved in permanent or temporary cookies.
automaticFlush boolean that indicates if the browser setting information should be saved each time a value changes (True), or just when the flush() method gets explicitly called (False)

Public Methods

public void clearHttpSessionValues ()

public void clearSessionBrowserSettings ()

public void clearSessionValues ()

public void clearSessionValues (WebIServerSession session)

public 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.

public String getHttpSessionValue (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. If not found, returns null

public String getSessionValue (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

public String getSessionValue (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 return
session an initialized WebIServerSession instance
Returns
  • the value found under the specified key, for the specified session

public String getValue (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. If not found, returns null

public void setHttpSessionValue (String keyName, String value)

Persists the specified http session value under the specified key. If the value sent is null, no changes will be saved.

Parameters
keyName name under to which the new setting will be saved
value value of the setting to be saved

public void setSessionValue (String keyName, 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 saved
value value of the setting to be saved

public void setSessionValue (String keyName, 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 saved
value value of the setting to be saved
session an initialized WebIServerSession instance

public void setValue (String keyName, String value)

Persists the specified value under the specified key. If the value sent is null, no changes will be saved.

Parameters
keyName name under to which the new setting will be saved
value value of the setting to be saved