gate.security
Class SessionImpl

java.lang.Object
  extended bygate.security.SessionImpl
All Implemented Interfaces:
Session

public class SessionImpl
extends Object
implements Session


Field Summary
private  Group group
          Group associated with the session a user may be member of many groups, but at login time only one could be specified
private  Long id
          ID of the session
private  boolean isPrivileged
          TRUE if user associated with the session is in the ADMINS user group, otherwise FALSE
private  int timeout
          sesion timeout (in minutes)
private  User user
          User associated with the session
 
Constructor Summary
SessionImpl(Long id, User usr, Group grp, int timeout, boolean isPrivileged)
          ---
 
Method Summary
 boolean equals(Object obj)
          this one is necessary for the contains() operations in Lists It is possible that two users have two different GroupImpl that refer to the very same GATE group in the DB, because they got it from the security factory at different times.
 Group getGroup()
          returns the group associated with the session a user may be member of many groups, but at login time only one could be specified
 Long getID()
          returns the session ID
 int getTimeout()
          returns the timeout (in minutes) of the session
 User getUser()
          returns the user associated with the session
 boolean isPrivilegedSession()
          TRUE if user associated with the session is in the ADMINS user group, otherwise FALSE
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private Long id
ID of the session


user

private User user
User associated with the session


group

private Group group
Group associated with the session a user may be member of many groups, but at login time only one could be specified


timeout

private int timeout
sesion timeout (in minutes)

See Also:
AccessControllerImpl.DEFAULT_SESSION_TIMEOUT_MIN

isPrivileged

private boolean isPrivileged
TRUE if user associated with the session is in the ADMINS user group, otherwise FALSE

Constructor Detail

SessionImpl

public SessionImpl(Long id,
                   User usr,
                   Group grp,
                   int timeout,
                   boolean isPrivileged)
---

Method Detail

getID

public Long getID()
returns the session ID

Specified by:
getID in interface Session

getUser

public User getUser()
returns the user associated with the session

Specified by:
getUser in interface Session

getGroup

public Group getGroup()
returns the group associated with the session a user may be member of many groups, but at login time only one could be specified

Specified by:
getGroup in interface Session

isPrivilegedSession

public boolean isPrivilegedSession()
TRUE if user associated with the session is in the ADMINS user group, otherwise FALSE

Specified by:
isPrivilegedSession in interface Session

getTimeout

public int getTimeout()
returns the timeout (in minutes) of the session

See Also:
AccessControllerImpl.DEFAULT_SESSION_TIMEOUT_MIN

equals

public boolean equals(Object obj)
this one is necessary for the contains() operations in Lists It is possible that two users have two different GroupImpl that refer to the very same GATE group in the DB, because they got it from the security factory at different times. So we assume that two instances refer the same GATE group if NAME1==NAME2