Skip navigation links


com.essbase.eas.server
Class SessionManager

java.lang.Object
  extended by com.essbase.eas.server.SessionManager


public class SessionManager
extends java.lang.Object

SessionManager This class coordinates authenticated users with their database connection parameters held in state. It passes an ISession on to SessionLogic to invoke the session's primitive calls. Must import class definition of every allowed ISession implementation (e.g. EssSession) ORDER OF ISESSION ATTRIBUTES String (session implementation class name) String (server machine name) String (user name) String (password) ...others where required by implementation

Since:
6.2.0
Version:
6.5.4
Author:
Brendan Gaul

Constructor Summary
SessionManager()
           

 

Method Summary
static ISession checkSession(java.lang.String sessionType, java.lang.String serverName, StoreService store, ServiceContext context)
          Check the user's context for a collection of sessions.
static ISession checkSession(java.lang.String sessionType, java.lang.String serverName, StoreService store, ServiceContext context, java.util.Locale locale)
           
static java.lang.Object getCSSUserObject(StoreService store, ServiceContext context)
          Return an external user object which is a CSSUserIF object
static java.lang.String getEmailAddress(StoreService store, ServiceContext context)
          get the users email address information
static java.lang.String getEmailName(StoreService store, ServiceContext context)
          Return the user's display or real name
static java.lang.String getEmailSMTPHost(StoreService store, ServiceContext context)
          Return the SMTP host to use to send email messages from this user
static FrameworkUser getFrameworkUser(StoreService store, ServiceContext context)
          Return an instance of the FrameworkUser for this context
static java.util.ArrayList getLoggedOnUsers(StoreService store, ServiceContext context)
           
static java.util.ArrayList getServerList(StoreService store, ServiceContext context)
          * Returns an ArrayList of Strings representing the servers that a given * user is authorised to access.
static java.util.ArrayList getServerList(StoreService store, ServiceContext context, java.lang.String type)
           
static ISession getSession(java.lang.String sessionType, java.lang.String serverName, StoreService store, ServiceContext context)
          Utility method signature defaults to US (see below)
static ISession getSession(java.lang.String sessionType, java.lang.String serverName, StoreService store, ServiceContext context, boolean wait)
           
static ISession getSession(java.lang.String sessionType, java.lang.String serverName, StoreService store, ServiceContext context, java.util.Locale locale, boolean wait, boolean checkOnly)
          Check the user's context for a collection of sessions.
static java.lang.String getToken(StoreService store, ServiceContext context)
           
static java.lang.String getUserName(StoreService store, ServiceContext context)
           
static boolean isAuthenticatedSession(StoreService store, ServiceContext context)
          check for an authenticated session.
static boolean isAuthenticatedSession(StoreService store, ServiceContext context, java.util.Locale locale)
          check for an authenticated session.
static boolean isSupervisor(StoreService store, ServiceContext context)
          Return whether the user is supervisor
static boolean isUserAdmin(StoreService store, ServiceContext context)
          Return whether the user is admin
static void login(java.lang.String username, java.lang.String password, StoreService store, ServiceContext context)
          * Convenience method defaults to US locale
static void login(java.lang.String username, java.lang.String password, StoreService store, ServiceContext context, java.util.Locale locale)
          * Requests authentication based on username and password, and requires * a handle to the PFServiceContext.
static void logout(StoreService store, ServiceContext context)
          * Signature of logout which defaults to US locale
static void logout(StoreService store, ServiceContext context, java.util.Locale locale)
          * Requests all active sessions shut down by calling logout in * SessionLogic for each session.
protected static void logoutUser(java.util.HashMap map, java.lang.String username)
           
static ISession reconnect(ISession session, java.lang.String serverName, java.util.PropertyResourceBundle pBundle)
           
static void releaseSession(ISession session)
           
static boolean removeSession(java.lang.String sessionType, java.lang.String serverName, StoreService store, ServiceContext context)
           
static void setEmailSettings(StoreService store, ServiceContext context, java.lang.String emailName, java.lang.String emailAddress)
           
protected static void setEmailSMTPHost(StoreService store, ServiceContext context, java.lang.String smtpHost)
          Set the smtp host so that it can be
static void updateSessionParameters(java.lang.String sessionType, java.lang.String serverName, java.util.ArrayList parameters, StoreService store, ServiceContext context)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SessionManager

public SessionManager()

Method Detail

getSession

public static ISession getSession(java.lang.String sessionType,
                                  java.lang.String serverName,
                                  StoreService store,
                                  ServiceContext context)
                           throws MessageException
Utility method signature defaults to US (see below)
Throws:
MessageException

getSession

public static ISession getSession(java.lang.String sessionType,
                                  java.lang.String serverName,
                                  StoreService store,
                                  ServiceContext context,
                                  boolean wait)
                           throws MessageException
Throws:
MessageException

releaseSession

public static void releaseSession(ISession session)

removeSession

public static boolean removeSession(java.lang.String sessionType,
                                    java.lang.String serverName,
                                    StoreService store,
                                    ServiceContext context)

isAuthenticatedSession

public static boolean isAuthenticatedSession(StoreService store,
                                             ServiceContext context)
                                      throws MessageException
check for an authenticated session. used to determine if the user has lost their session and are trying to reconnect. used by EAS admin commands.
Parameters:
store -
context -
Returns:
Throws:
MessageException

isAuthenticatedSession

public static boolean isAuthenticatedSession(StoreService store,
                                             ServiceContext context,
                                             java.util.Locale locale)
                                      throws MessageException
check for an authenticated session. used to determine if the user has lost their session and are trying to reconnect. used by EAS admin commands
Parameters:
store -
context -
locale -
Throws:
MessageException

checkSession

public static ISession checkSession(java.lang.String sessionType,
                                    java.lang.String serverName,
                                    StoreService store,
                                    ServiceContext context)
                             throws MessageException
Check the user's context for a collection of sessions. Look within that for the requested session. If it exists, return it. If it does not exist, return null
Throws:
MessageException

checkSession

public static ISession checkSession(java.lang.String sessionType,
                                    java.lang.String serverName,
                                    StoreService store,
                                    ServiceContext context,
                                    java.util.Locale locale)
                             throws MessageException
Throws:
MessageException

getSession

public static ISession getSession(java.lang.String sessionType,
                                  java.lang.String serverName,
                                  StoreService store,
                                  ServiceContext context,
                                  java.util.Locale locale,
                                  boolean wait,
                                  boolean checkOnly)
                           throws MessageException
Check the user's context for a collection of sessions. Look within that for the requested session. If it exists, return it. If it does not exist, request that it be created. If this method returns null, it is assumed that either the connection was broken or that there was a loss of communication with the database requiring reauthentication, in which case it will forward a request to the view handler for login.
Throws:
MessageException

reconnect

public static ISession reconnect(ISession session,
                                 java.lang.String serverName,
                                 java.util.PropertyResourceBundle pBundle)
                          throws MessageException
Throws:
MessageException

login

public static void login(java.lang.String username,
                         java.lang.String password,
                         StoreService store,
                         ServiceContext context)
                  throws MessageException,
                         java.lang.Exception
* Convenience method defaults to US locale
Throws:
MessageException
java.lang.Exception

login

public static void login(java.lang.String username,
                         java.lang.String password,
                         StoreService store,
                         ServiceContext context,
                         java.util.Locale locale)
                  throws MessageException,
                         java.lang.Exception
* Requests authentication based on username and password, and requires * a handle to the PFServiceContext. If the call fails to authenticate, it ensures * that all session information is destroyed. It also sets APPLICATION_STATUS to * failure status.
Throws:
MessageException
java.lang.Exception

getLoggedOnUsers

public static java.util.ArrayList getLoggedOnUsers(StoreService store,
                                                   ServiceContext context)

updateSessionParameters

public static void updateSessionParameters(java.lang.String sessionType,
                                           java.lang.String serverName,
                                           java.util.ArrayList parameters,
                                           StoreService store,
                                           ServiceContext context)

logout

public static void logout(StoreService store,
                          ServiceContext context)
                   throws MessageException
* Signature of logout which defaults to US locale
Throws:
MessageException

logout

public static void logout(StoreService store,
                          ServiceContext context,
                          java.util.Locale locale)
                   throws MessageException
* Requests all active sessions shut down by calling logout in * SessionLogic for each session.
Throws:
MessageException

getServerList

public static java.util.ArrayList getServerList(StoreService store,
                                                ServiceContext context)
* Returns an ArrayList of Strings representing the servers that a given * user is authorised to access.

getServerList

public static java.util.ArrayList getServerList(StoreService store,
                                                ServiceContext context,
                                                java.lang.String type)

getUserName

public static java.lang.String getUserName(StoreService store,
                                           ServiceContext context)

getToken

public static java.lang.String getToken(StoreService store,
                                        ServiceContext context)

getCSSUserObject

public static java.lang.Object getCSSUserObject(StoreService store,
                                                ServiceContext context)
Return an external user object which is a CSSUserIF object
Parameters:
store -
context -
Returns:
obj which is a CSSUserIF

isSupervisor

public static boolean isSupervisor(StoreService store,
                                   ServiceContext context)
Return whether the user is supervisor

isUserAdmin

public static boolean isUserAdmin(StoreService store,
                                  ServiceContext context)
Return whether the user is admin

getEmailAddress

public static java.lang.String getEmailAddress(StoreService store,
                                               ServiceContext context)
get the users email address information
Parameters:
store -
context -
Returns:
the users email address

getEmailName

public static java.lang.String getEmailName(StoreService store,
                                            ServiceContext context)
Return the user's display or real name
Parameters:
store -
context -
Returns:
the users email display name i.e. real name

setEmailSettings

public static void setEmailSettings(StoreService store,
                                    ServiceContext context,
                                    java.lang.String emailName,
                                    java.lang.String emailAddress)

getEmailSMTPHost

public static java.lang.String getEmailSMTPHost(StoreService store,
                                                ServiceContext context)
Return the SMTP host to use to send email messages from this user
Parameters:
store -
context -
Returns:
the SMTP host

setEmailSMTPHost

protected static void setEmailSMTPHost(StoreService store,
                                       ServiceContext context,
                                       java.lang.String smtpHost)
Set the smtp host so that it can be
Parameters:
store -
context -
smtpHost -

getFrameworkUser

public static FrameworkUser getFrameworkUser(StoreService store,
                                             ServiceContext context)
Return an instance of the FrameworkUser for this context
Parameters:
store -
context -
Returns:
the context's FrameworkUser

logoutUser

protected static void logoutUser(java.util.HashMap map,
                                 java.lang.String username)

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.