|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opencms.core.CmsCoreSession
This class implements a session storage which is mainly used to count the currently logged in OpenCms users.
It is required for user authentification of OpenCms. For each active user, its name and other additional information (like the current user group) are stored in a hashtable, useing the session Id as key to them.
When the session gets destroyed, the user will removed from the storage.
One of the main purposes of this stored user session list is the
sendBroadcastMessage() method.
sendBroadcastMessage(String message)| Field Summary |
| Constructor Summary | |
CmsCoreSession()
Constructor, creates a new CmsCoreSession object. |
|
| Method Summary | |
void |
deleteUser(String sessionId)
Removes a user from the session storage. |
String |
getCurrentGroup(String sessionId)
Gets the current usergroup of a user from the session storage. |
Integer |
getCurrentProject(String sessionId)
Gets the current project of a user from the session storage. |
Vector |
getLoggedInUsers()
Returns a Vector with all currently logged in users. |
Hashtable |
getUser(String sessionId)
Gets the complete user information of a user from the session storage. |
String |
getUserName(String sessionId)
Gets the username of a user from the session storage. |
void |
putUser(String sessionId,
Hashtable userinfo)
Puts a new user into the sesstion storage, this method also stores a complete hashtable with additional user information. |
void |
putUser(String sessionId,
String username)
Puts a new user into the sesstion storage. |
void |
putUser(String sessionId,
String username,
String group,
Integer project)
Puts a new user into the sesstion storage. |
void |
sendBroadcastMessage(String message)
Sends a broadcast message to all logged in users. |
int |
size()
Returns the number of current sessions in the system. |
String |
toString()
Returns a string-representation for this object which can be used for debugging. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CmsCoreSession()
| Method Detail |
public void deleteUser(String sessionId)
public String getCurrentGroup(String sessionId)
public Integer getCurrentProject(String sessionId)
public Hashtable getUser(String sessionId)
sessionId - A currently valid session id.
public String getUserName(String sessionId)
sessionId - A currently valid session id.
public void putUser(String sessionId,
String username)
A user is stored with its current session id after a positive authentification.
sessionId - A currently valid session id.username - The name of the user to be stored.
public void putUser(String sessionId,
String username,
String group,
Integer project)
A user is stored with its current session id after a positive authentification.
sessionId - A currently valid session id.username - The name of the user to be stored.group - The name of the users current group.project - The id of the users current project.
public void putUser(String sessionId,
Hashtable userinfo)
A user is stored with its current session id after a positive authentification.
userinfo - A Hashtable containing information (including the name) about the user.public int size()
public String toString()
toString in class Objectpublic Vector getLoggedInUsers()
The Vector elements are Hashtables with the users name,
the current project, the current group a Boolean if current messages
are pending.
public void sendBroadcastMessage(String message)
message - the message to send to all users.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||