Interface BrowserSettings

    • Method Detail

      • setSession

        void setSession​(WebIServerSession currentSession)
        Sets the session that will be used as default when accessing session settings.
        Parameters:
        currentSession - an initialized WebIServerSession instance 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 WebIServerSession instance that represents the current session opened. Returns null if 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 return
        session - an initialized WebIServerSession instance
        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 saved
        value - 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 saved
        value - 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 saved
        value - 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 saved
        value - value of the setting to be saved
        session - an initialized WebIServerSession instance
      • 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_NETSCAPE
      • BROWSER_TYPE_IE
      • BROWSER_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_IE6
      • BROWSER_TYPE_FIREFOX_3
      • BROWSER_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 boolean value 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 boolean value 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 String value indicating USER-AGENT string from the header of the browser
        Since:
        MicroStrategy Web 8.0.0
      • getLocale

        java.lang.String getLocale()
        Deprecated.
        Not used anymore. Use getSession() 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 valid Preferences instance
      • getPreferences

        Preferences getPreferences()
        Get the Preferences instance currently assigned to this BrowserSettings
        Returns:
        a Preferences instance
      • 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 BrowserSettingDefinitionList instance 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