|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jzeno.aop.SecuritySupport
public class SecuritySupport
This class allows you to perfom security related operations from any part of your application.
Constructor Summary | |
---|---|
SecuritySupport()
|
Method Summary | |
---|---|
static boolean |
currentUserHasPermission(java.lang.String permissionName)
Checks that the current user has the required user privilege. |
static boolean |
currentUserHasRole(java.lang.String roleName)
Checks that the current user has the required user privilege. |
static User |
getCurrentUser()
Retrieves the current user. |
static java.lang.String |
getCurrentUserName()
Retrieve the name of the user that is associated with this session. |
static void |
login(User user)
Sets the current logged in user. |
static void |
loginDummy()
|
static void |
logout(java.lang.String userName)
This operation should be called when the user logs out. |
static void |
logoutAll()
This operation flushes all the user data caches and removes any current user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecuritySupport()
Method Detail |
---|
public static java.lang.String getCurrentUserName()
Retrieve the name of the user that is associated with this session.
public static void login(User user)
Sets the current logged in user. Only called by the security framework after a login is detected.
public static void loginDummy()
public static User getCurrentUser()
Retrieves the current user.
User
instance, representing the currently logged in
user.public static void logout(java.lang.String userName)
This operation should be called when the user logs out.
userName
- the user that logged out.public static void logoutAll()
This operation flushes all the user data caches and removes any current user. Handy for use in test cases, etc..
public static boolean currentUserHasPermission(java.lang.String permissionName)
Checks that the current user has the required user privilege.
public static boolean currentUserHasRole(java.lang.String roleName)
Checks that the current user has the required user privilege.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |