Class SessionConfig

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    @StableMinor(version="17.0",
                 sinceVersion="4.0")
    public final class SessionConfig
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable
    Stores user session information.
    Since:
    4.0.6
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Constructor Detail

      • SessionConfig

        @Deprecated
        public SessionConfig()
        Deprecated.
        Since 4.0.8, the SessionConfig should not be created using this constructor. Instead obtain it by calling getCurrentSessionConfig() or the methods available in IAuthenticationManager.
        Since:
        4.0.0
    • Method Detail

      • getUserSessionId

        public java.lang.String getUserSessionId()
        Returns:
        Returns the userSessionId.
      • setUserSessionId

        @Deprecated
        public void setUserSessionId​(java.lang.String userSessionId)
        Deprecated.
        Since 4.0.8, you should obtain the session config instance already constructed from getCurrentSessionConfig() or a method in IAuthenticationManager and there is no need to set the userSessionId.
        Parameters:
        userSessionId - The userSessionId to set.
      • getLocale

        public java.util.Locale getLocale()
        Returns:
        Returns the locale.
      • setLocale

        public void setLocale​(java.util.Locale locale)
        Parameters:
        locale - The locale to set.
      • getUserConfig

        public UserConfig getUserConfig()
                                 throws PortalException
        Returns the UserConfig associated with this session, cached inside this instance. The value returned may not reflect changes occurred since the start of this session.
        Returns:
        the UserConfig associated with this session.
        Throws:
        PortalException
        Since:
        11.0.0
      • getUserId

        public java.lang.String getUserId()
                                   throws PortalException
        Gets the user id associated with this session.
        Returns:
        the user id associated with this session.
        Throws:
        PortalException - if it was not possible to obtain the userId for this SessionConfig.
        Since:
        4.0.8
      • getCurrentSessionConfig

        public static SessionConfig getCurrentSessionConfig()
        Returns the current session config object.
        Returns:
        the current session config object.
        Since:
        4.0.7
      • clone

        protected SessionConfig clone()
        Overrides:
        clone in class java.lang.Object