Class AbstractBrowserSettings

    • 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
    • Method Detail

      • 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 saved
        value - 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 interface BrowserSettings
        Overrides:
        hasValueSet in class GenericBrowserSettings
        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 saved
        value - 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 saved
        value - 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 saved
        value - value of the setting to be saved
        session - an initialized WebIServerSession 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 return
        session - an initialized WebIServerSession 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 initialized WebIServerSession 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)