public abstract class

AbstractBrowserSettings

extends GenericBrowserSettings
java.lang.Object
   ↳ com.microstrategy.web.app.GenericBrowserSettings
     ↳ com.microstrategy.web.app.AbstractBrowserSettings
Known Direct Subclasses

Class Overview

This class provides a common implementation of BrowserSettings interface. The environment-dependend browser settings classes override or implement the load or store methods.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.GenericBrowserSettings
From interface com.microstrategy.web.objects.EnumBrowserType
Fields
protected BrowserSettingElement _bSet Container for browser setting values
protected BrowserSettingElement _bSetHttpSession Container for HttpSession browser setting values
protected BrowserSettingElement _bSetSession Container for Session browser setting values
[Expand]
Inherited Fields
From class com.microstrategy.web.app.GenericBrowserSettings
Protected Constructors
AbstractBrowserSettings(BrowserSettingDefinitionList bsDefinitionList, Preferences preferences, ContainerServices containerServices)
Public Methods
void clearHttpSessionValues()
void clearSessionValues()
Clears session browser settings
void clearSessionValues(WebIServerSession session)
void flush()
Store the browser settings windows to more persistent storage.
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
boolean hasValueSet(String keyName)
Checks whether a value has been set for the given key name or not
void setHttpSessionValue(String keyName, String value)
Persists the specified http session value under the specified key.
void setSession(WebIServerSession currentSession)
Sets the session that will be used as default when accessing session settings and also reloads session browser settings.
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.
Protected Methods
boolean canStore(BrowserSettingElement bSet)
String getProjectKey(WebIServerSession session)
Returns the key to be used for the requested session
String getValue(BrowserSettingElement browserSettingElement, String keyName, boolean checkForXSS)
Get browser setting value.
BrowserSettingElement loadHttpSessionValues()
Load temporary browser setting windows from web session.
BrowserSettingElement loadSessionValues()
Load project browser setting windows from web session.
abstract BrowserSettingElement loadValues()
Store permenant browser setting windows in persistent storage.
void storeHttpSessionValues(BrowserSettingElement bSetHttpSession)
Store temporary browser setting windows to web session.
void storeSessionValues(BrowserSettingElement bSetSession)
Store project browser setting windows to web session.
abstract void storeValues(BrowserSettingElement bSet)
Load permanent browser setting windows from persistent storage.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.GenericBrowserSettings
From class java.lang.Object
From interface com.microstrategy.web.app.BrowserSettings

Fields

protected BrowserSettingElement _bSet

Container for browser setting values

protected BrowserSettingElement _bSetHttpSession

Container for HttpSession browser setting values

protected BrowserSettingElement _bSetSession

Container for Session browser setting values

Protected Constructors

protected AbstractBrowserSettings (BrowserSettingDefinitionList bsDefinitionList, Preferences preferences, ContainerServices containerServices)

Public Methods

public void clearHttpSessionValues ()

public void clearSessionValues ()

Clears session browser settings

public void clearSessionValues (WebIServerSession session)

public void flush ()

Store the browser settings windows to more persistent storage.

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.

public boolean hasValueSet (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)

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 setSession (WebIServerSession currentSession)

Sets the session that will be used as default when accessing session settings and also reloads session browser settings.

Parameters
currentSession an initialized WebIServerSession instance that represents the current session opened.

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

Protected Methods

protected boolean canStore (BrowserSettingElement bSet)

protected String getProjectKey (WebIServerSession session)

Returns the key to be used for the requested session

Parameters
session an initialized WebIServerSession instance
Returns
  • a key built based on the session information sent as parameter. Returns null, if the session is not valid.

protected String getValue (BrowserSettingElement browserSettingElement, String keyName, boolean checkForXSS)

Get browser setting value.

Parameters
browserSettingElement An instance of BrowserSettingElement.
keyName The browser setting key.
checkForXSS TODO
Returns
  • If the value is not found in browserSettings given, returns the default value defined in browser setting definition.

protected BrowserSettingElement loadHttpSessionValues ()

Load temporary browser setting windows from web session.

protected BrowserSettingElement loadSessionValues ()

Load project browser setting windows from web session.

protected abstract BrowserSettingElement loadValues ()

Store permenant browser setting windows in persistent storage.

protected void storeHttpSessionValues (BrowserSettingElement bSetHttpSession)

Store temporary browser setting windows to web session.

protected void storeSessionValues (BrowserSettingElement bSetSession)

Store project browser setting windows to web session.

protected abstract void storeValues (BrowserSettingElement bSet)

Load permanent browser setting windows from persistent storage.