|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.portal.business.user.AdminUserHome
public final class AdminUserHome
This class provides instances management methods (create, find, ...) for AdminUser objects
| Method Summary | |
|---|---|
static int |
checkAccessCodeAlreadyInUse(java.lang.String strAccessCode)
Checks if a given login is already in use |
static int |
checkEmailAlreadyInUse(java.lang.String strEmail)
Checks if a given email is already in use |
static boolean |
checkRoleAttributed(java.lang.String strRoleKey)
Checks wether the role is in use or not |
static void |
create(AdminUser user)
|
static void |
create(LuteceDefaultAdminUser user)
|
static void |
createRightForUser(int nUserId,
java.lang.String strRightId)
|
static void |
createRoleForUser(int nUserId,
java.lang.String strRightId)
|
static java.util.Collection<AdminUser> |
findByLevel(int nIdLevel)
Get all users having a given level |
static AdminUser |
findByPrimaryKey(int nUserId)
Get the user infos from user id |
static java.util.Collection<AdminUser> |
findByRight(java.lang.String strIdRight)
Get all users having a given right |
static java.util.Collection<AdminUser> |
findByRole(java.lang.String strRoleKey)
Get all users having a given role |
static LuteceDefaultAdminUser |
findLuteceDefaultAdminUserByPrimaryKey(int nUserId)
Get the user infos from user id |
static java.util.Collection<AdminUser> |
findUserByFilter(AdminUserFilter auFilter)
Get all users by using a filter. |
static AdminUser |
findUserByLogin(java.lang.String strUserLogin)
Get the user infos from the access code. |
static java.util.Collection<AdminUser> |
findUserList()
|
static java.util.Map<java.lang.String,Right> |
getRightsListForUser(int nUserId)
Get the right list associated to a given user id |
static java.util.Map<java.lang.String,AdminRole> |
getRolesListForUser(int nUserId)
Get the role list associated to a given user id |
static boolean |
hasRight(AdminUser user,
java.lang.String strIdRight)
Check if the user has the given right |
static boolean |
hasRole(AdminUser user,
java.lang.String strRoleKey)
Check if the user has the role |
static void |
remove(int nUserId)
|
static void |
removeAllDelegatedRightsForUser(AdminUser user)
|
static void |
removeAllOwnRightsForUser(AdminUser user)
|
static void |
removeAllRightsForUser(int nUserId)
|
static void |
removeAllRolesForUser(int nUserId)
|
static void |
removeRightForUser(int nUserId,
java.lang.String strIdRight)
Remove a right for an user |
static void |
removeRoleForUser(int nUserId,
java.lang.String strRoleKey)
Remove role for an user |
static void |
update(AdminUser user)
|
static void |
update(LuteceDefaultAdminUser user)
|
static void |
updateUsersRole(java.lang.String strOldRoleKey,
AdminRole role)
Update role key if role key name has change |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static AdminUser findUserByLogin(java.lang.String strUserLogin)
strUserLogin - the login
public static AdminUser findByPrimaryKey(int nUserId)
nUserId - the user identifier
public static java.util.Collection<AdminUser> findUserList()
public static void create(AdminUser user)
user - The AdminUserpublic static void update(AdminUser user)
user - The AdminUserpublic static void remove(int nUserId)
nUserId - the user identifierpublic static java.util.Map<java.lang.String,Right> getRightsListForUser(int nUserId)
nUserId - the id of the user to retrieve rights
public static void createRightForUser(int nUserId,
java.lang.String strRightId)
nUserId - The user identifierstrRightId - The right identifierpublic static void removeAllRightsForUser(int nUserId)
nUserId - The user identifierpublic static void removeAllDelegatedRightsForUser(AdminUser user)
user - The Admin User objectpublic static void removeAllOwnRightsForUser(AdminUser user)
user - The Admin User objectpublic static java.util.Map<java.lang.String,AdminRole> getRolesListForUser(int nUserId)
nUserId - the id of the user to retrieve rights
public static void createRoleForUser(int nUserId,
java.lang.String strRightId)
nUserId - the id of the userstrRightId - the right identifierpublic static void removeAllRolesForUser(int nUserId)
nUserId - the user identifierpublic static boolean checkRoleAttributed(java.lang.String strRoleKey)
strRoleKey - the role key to check
public static int checkAccessCodeAlreadyInUse(java.lang.String strAccessCode)
strAccessCode - The login
public static int checkEmailAlreadyInUse(java.lang.String strEmail)
strEmail - The email
public static boolean hasRole(AdminUser user,
java.lang.String strRoleKey)
user - The AdminUserstrRoleKey - The role Key
public static void removeRoleForUser(int nUserId,
java.lang.String strRoleKey)
nUserId - The ID of the userstrRoleKey - The role keypublic static void create(LuteceDefaultAdminUser user)
user - the LuteceDefaultAdminUSerpublic static void update(LuteceDefaultAdminUser user)
user - the LuteceDefaultAdminUSerpublic static LuteceDefaultAdminUser findLuteceDefaultAdminUserByPrimaryKey(int nUserId)
nUserId - the user identifier
public static java.util.Collection<AdminUser> findByRole(java.lang.String strRoleKey)
strRoleKey - The role key
public static java.util.Collection<AdminUser> findByLevel(int nIdLevel)
nIdLevel - The level
public static void updateUsersRole(java.lang.String strOldRoleKey,
AdminRole role)
strOldRoleKey - The old role key namerole - The new rolepublic static java.util.Collection<AdminUser> findUserByFilter(AdminUserFilter auFilter)
auFilter - The filter
public static java.util.Collection<AdminUser> findByRight(java.lang.String strIdRight)
strIdRight - The ID right
public static boolean hasRight(AdminUser user,
java.lang.String strIdRight)
user - The Admin UserstrIdRight - The ID right
public static void removeRightForUser(int nUserId,
java.lang.String strIdRight)
nUserId - The user IDstrIdRight - The right ID
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||