Package com.microstrategy.web.app
Class AbstractBrowserSettings
- java.lang.Object
-
- com.microstrategy.web.app.GenericBrowserSettings
-
- com.microstrategy.web.app.AbstractBrowserSettings
-
- All Implemented Interfaces:
BrowserSettings
,EnumBrowserType
- Direct Known Subclasses:
CookieBrowserSettings
,PreferenceBrowserSettings
public abstract class AbstractBrowserSettings extends GenericBrowserSettings
This class provides a common implementation of BrowserSettings interface. The environment-dependend browser settings classes override or implement the load or store methods.- Since:
- MicroStrategy Web 8.0.2
-
-
Field Summary
Fields Modifier and Type Field Description protected com.microstrategy.web.app.BrowserSettingElement
_bSet
Container for browser setting valuesprotected com.microstrategy.web.app.BrowserSettingElement
_bSetHttpSession
Container for HttpSession browser setting valuesprotected com.microstrategy.web.app.BrowserSettingElement
_bSetSession
Container for Session browser setting values-
Fields inherited from class com.microstrategy.web.app.GenericBrowserSettings
_containerServices, _session, GENERIC_HTTP_SESSION_KEY, GENERIC_KEY, GENERIC_PROJECT_KEY_PREFIX
-
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBrowserSettings(BrowserSettingDefinitionList bsDefinitionList, Preferences preferences, ContainerServices containerServices)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
canStore(com.microstrategy.web.app.BrowserSettingElement bSet)
void
clearHttpSessionValues()
Clear http session browser settings.void
clearSessionValues()
Clears session browser settingsvoid
clearSessionValues(WebIServerSession session)
Clear the session browser settings for the given session.void
flush()
Store the browser settings windows to more persistent storage.java.lang.String
getHttpSessionValue(java.lang.String keyName)
Returns the http session value of the key sent as parameterprotected java.lang.String
getProjectKey(WebIServerSession session)
Returns the key to be used for the requested sessionjava.lang.String
getSessionValue(java.lang.String keyName)
Returns the value of the key sent as parameter, related with the setting corresponding to the default sessionjava.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.protected java.lang.String
getValue(com.microstrategy.web.app.BrowserSettingElement browserSettingElement, java.lang.String keyName, boolean checkForXSS)
Get browser setting value.java.lang.String
getValue(java.lang.String keyName)
Returns the value of the key sent as parameterboolean
hasValueSet(java.lang.String keyName)
Checks whether a value has been set for the given key name or notprotected com.microstrategy.web.app.BrowserSettingElement
loadHttpSessionValues()
Load temporary browser setting windows from web session.protected com.microstrategy.web.app.BrowserSettingElement
loadSessionValues()
Load project browser setting windows from web session.protected abstract com.microstrategy.web.app.BrowserSettingElement
loadValues()
Store permenant browser setting windows in persistent storage.void
setHttpSessionValue(java.lang.String keyName, java.lang.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(java.lang.String keyName, java.lang.String value)
Persists the specified value under the specified key for the default sessionvoid
setSessionValue(java.lang.String keyName, java.lang.String value, WebIServerSession session)
Persists the specified value under the specified key for the indicated sessionvoid
setValue(java.lang.String keyName, java.lang.String value)
Persists the specified value under the specified key.protected void
storeHttpSessionValues(com.microstrategy.web.app.BrowserSettingElement bSetHttpSession)
Store temporary browser setting windows to web session.protected void
storeSessionValues(com.microstrategy.web.app.BrowserSettingElement bSetSession)
Store project browser setting windows to web session.protected abstract void
storeValues(com.microstrategy.web.app.BrowserSettingElement bSet)
Load permanent browser setting windows from persistent storage.-
Methods inherited from class com.microstrategy.web.app.GenericBrowserSettings
addCacheValue, addCacheValue, getBrowserCompatName, getBrowserName, getBrowserType, getBrowserTypeAndVersion, getBrowserVersion, getCacheNames, getCacheValue, getCacheValue, getDebugOut, getDefaultValue, getDefinitionList, getLocale, getPreferences, getSession, getUserAgent, getValueFromQueryString, isCacheValueModified, isCacheValuePersistable, isCSS2Supported, isDHTMLSupported, isEdgeModeEnabled, isValueCached, isValueSafeForXSS, setCacheValuePersistable, setDefinitionList, setIframeVisibility, setPreferences, updateCacheValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.app.BrowserSettings
clearSessionBrowserSettings
-
-
-
-
Field Detail
-
_bSet
protected com.microstrategy.web.app.BrowserSettingElement _bSet
Container for browser setting values
-
_bSetHttpSession
protected com.microstrategy.web.app.BrowserSettingElement _bSetHttpSession
Container for HttpSession browser setting values
-
_bSetSession
protected com.microstrategy.web.app.BrowserSettingElement _bSetSession
Container for Session browser setting values
-
-
Constructor Detail
-
AbstractBrowserSettings
protected AbstractBrowserSettings(BrowserSettingDefinitionList bsDefinitionList, Preferences preferences, ContainerServices containerServices)
-
-
Method Detail
-
setSession
public void setSession(WebIServerSession currentSession)
Sets the session that will be used as default when accessing session settings and also reloads session browser settings.- Specified by:
setSession
in interfaceBrowserSettings
- Overrides:
setSession
in classGenericBrowserSettings
- Parameters:
currentSession
- an initializedWebIServerSession
instance that represents the current session opened.
-
setValue
public void setValue(java.lang.String keyName, java.lang.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 savedvalue
- value of the setting to be saved
-
getValue
public 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
public boolean hasValueSet(java.lang.String keyName)
Description copied from interface:BrowserSettings
Checks whether a value has been set for the given key name or not- Specified by:
hasValueSet
in interfaceBrowserSettings
- Overrides:
hasValueSet
in classGenericBrowserSettings
- 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
-
setHttpSessionValue
public void setHttpSessionValue(java.lang.String keyName, java.lang.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 savedvalue
- value of the setting to be saved
-
getHttpSessionValue
public 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. If not found, returns
null
-
setSessionValue
public 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
public 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 initializedWebIServerSession
instance
-
getSessionValue
public 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
public 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 initializedWebIServerSession
instance- Returns:
- the value found under the specified key, for the specified session
-
flush
public void flush()
Store the browser settings windows to more persistent storage.
-
clearSessionValues
public void clearSessionValues()
Clears session browser settings
-
clearSessionValues
public void clearSessionValues(WebIServerSession session)
Description copied from interface:BrowserSettings
Clear the session browser settings for the given session.
-
clearHttpSessionValues
public void clearHttpSessionValues()
Description copied from interface:BrowserSettings
Clear http session browser settings.
-
loadValues
protected abstract com.microstrategy.web.app.BrowserSettingElement loadValues()
Store permenant browser setting windows in persistent storage.
-
storeValues
protected abstract void storeValues(com.microstrategy.web.app.BrowserSettingElement bSet)
Load permanent browser setting windows from persistent storage.
-
loadHttpSessionValues
protected com.microstrategy.web.app.BrowserSettingElement loadHttpSessionValues()
Load temporary browser setting windows from web session.
-
storeHttpSessionValues
protected void storeHttpSessionValues(com.microstrategy.web.app.BrowserSettingElement bSetHttpSession)
Store temporary browser setting windows to web session.
-
loadSessionValues
protected com.microstrategy.web.app.BrowserSettingElement loadSessionValues()
Load project browser setting windows from web session.
-
storeSessionValues
protected void storeSessionValues(com.microstrategy.web.app.BrowserSettingElement bSetSession)
Store project browser setting windows to web session.
-
getValue
protected java.lang.String getValue(com.microstrategy.web.app.BrowserSettingElement browserSettingElement, java.lang.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.
-
getProjectKey
protected java.lang.String getProjectKey(WebIServerSession session)
Returns the key to be used for the requested session- Parameters:
session
- an initializedWebIServerSession
instance- Returns:
- a key built based on the session information sent as parameter. Returns null, if the session is not valid.
-
canStore
protected boolean canStore(com.microstrategy.web.app.BrowserSettingElement bSet)
-
-