gate.security
Class SessionImpl
java.lang.Object
|
+--gate.security.SessionImpl
- All Implemented Interfaces:
- Session
- public class SessionImpl
- extends Object
- implements Session
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 |
SessionImpl
public SessionImpl(Long id,
User usr,
Group grp,
int timeout,
boolean isPrivileged)
- ---
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
- Overrides:
equals
in class Object