Class HttpBrowserSettings

  • All Implemented Interfaces:
    BrowserSettings, EnumBrowserType

    @Deprecated
    public class HttpBrowserSettings
    extends GenericBrowserSettings
    Deprecated.
    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.

    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Constructor Detail

      • HttpBrowserSettings

        public HttpBrowserSettings​(BrowserSettingDefinitionList bsDefinitionList,
                                   ContainerServices containerServices)
        Deprecated.
        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
      • HttpBrowserSettings

        public HttpBrowserSettings​(BrowserSettingDefinitionList bsDefinitionList,
                                   ContainerServices containerServices,
                                   boolean usePermanentCookies)
        Deprecated.
        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.
      • HttpBrowserSettings

        public HttpBrowserSettings​(BrowserSettingDefinitionList bsDefinitionList,
                                   ContainerServices containerServices,
                                   boolean processBrowserSettings,
                                   boolean usePermanentCookies)
        Deprecated.
        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.
      • HttpBrowserSettings

        public HttpBrowserSettings​(BrowserSettingDefinitionList bsDefinitionList,
                                   ContainerServices containerServices,
                                   boolean processBrowserSettings,
                                   boolean usePermanentCookies,
                                   boolean automaticFlush)
        Deprecated.
        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)
    • Method Detail

      • flush

        public void flush()
        Deprecated.
        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.
      • getValue

        public java.lang.String getValue​(java.lang.String keyName)
        Deprecated.
        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
      • setValue

        public void setValue​(java.lang.String keyName,
                             java.lang.String value)
        Deprecated.
        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
      • getHttpSessionValue

        public java.lang.String getHttpSessionValue​(java.lang.String keyName)
        Deprecated.
        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
      • setHttpSessionValue

        public void setHttpSessionValue​(java.lang.String keyName,
                                        java.lang.String value)
        Deprecated.
        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
      • getSessionValue

        public java.lang.String getSessionValue​(java.lang.String keyName)
        Deprecated.
        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)
        Deprecated.
        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
      • setSessionValue

        public void setSessionValue​(java.lang.String keyName,
                                    java.lang.String value)
        Deprecated.
        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)
        Deprecated.
        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
      • clearSessionValues

        public void clearSessionValues()
        Deprecated.
        Description copied from interface: BrowserSettings
        Clear the session browser settings for current Intelligence Server session.
        Since:
        MicroStrategy Web 8.0.2
      • clearSessionValues

        public void clearSessionValues​(WebIServerSession session)
        Deprecated.
        Description copied from interface: BrowserSettings
        Clear the session browser settings for the given session.
        Since:
        MicroStrategy Web 8.0.2
      • clearHttpSessionValues

        public void clearHttpSessionValues()
        Deprecated.
        Description copied from interface: BrowserSettings
        Clear http session browser settings.
        Since:
        MicroStrategy Web 8.0.2
      • clearSessionBrowserSettings

        public void clearSessionBrowserSettings()
        Deprecated.
        Description copied from interface: BrowserSettings
        Clear the session browser settings for current Intelligence Server session.