|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.portal.business.user.AdminUserDAO
public class AdminUserDAO
This class porvides Data Access methods for AdminUser objects
Constructor Summary | |
---|---|
AdminUserDAO()
|
Method Summary | |
---|---|
int |
checkAccessCodeAlreadyInUse(java.lang.String strAccessCode)
Check weather the access code already exists or not |
int |
checkEmailAlreadyInUse(java.lang.String strEmail)
Checks the availibility of an email |
boolean |
checkRoleAttributed(java.lang.String strRoleKey)
Checks wether the role is in use or not |
void |
delete(int nUserId)
Delete a admin user |
void |
deleteAllDelegatedRightsForUser(int nUserId,
int nUserLevel)
Deletes rights delegated by user ie rights with level < userlevel |
void |
deleteAllOwnRightsForUser(int nUserId,
int nUserLevel)
Deletes rights own by user ie rights with level >= userlevel |
void |
deleteAllRightsForUser(int nUserId)
Delete all rights for an user |
void |
deleteAllRolesForUser(int nUserId)
Remove all roles from an user |
void |
deleteRightForUser(int nUserId,
java.lang.String strIdRight)
Remove a right for an user |
void |
deleteRoleForUser(int nUserId,
java.lang.String strRoleKey)
Remove role for an user |
boolean |
hasRight(int nUserId,
java.lang.String strIdRight)
Check if the user has the given right |
boolean |
hasRole(int nUserId,
java.lang.String strRoleKey)
Check if the user has the role |
void |
insert(AdminUser user)
Insert a new record in the table. |
void |
insert(LuteceDefaultAdminUser user)
Insert a new record in the table. |
void |
insertRightsListForUser(int nUserId,
java.lang.String strRightId)
Insert a right for a user |
void |
insertRolesListForUser(int nUserId,
java.lang.String strRoleKey)
Add a role to an user |
AdminUser |
load(int nUserId)
Load an AdminUser |
LuteceDefaultAdminUser |
loadDefaultAdminUser(int nUserId)
Gets a default admin user |
int |
newPrimaryKey()
Generates a new primary key |
java.util.Map<java.lang.String,Right> |
selectRightsListForUser(int nUserId)
Get the right list associated to a given user id |
java.util.Map<java.lang.String,AdminRole> |
selectRolesListForUser(int nUserId)
Get the role list associated to a given user id |
AdminUser |
selectUserByAccessCode(java.lang.String strUserAccessCode)
Get an user by its access code (login) |
java.util.Collection<AdminUser> |
selectUserList()
Get a list of all admin users |
java.util.Collection<AdminUser> |
selectUsersByFilter(AdminUserFilter auFilter)
Gets a collection of AdminUser by using a filter. |
java.util.Collection<AdminUser> |
selectUsersByLevel(int nIdLevel)
Select all user that own a given level |
java.util.Collection<AdminUser> |
selectUsersByRight(java.lang.String strIdRight)
Get all users having a given right |
java.util.Collection<AdminUser> |
selectUsersByRole(java.lang.String strRoleKey)
Select all user that own a given role |
void |
store(AdminUser user)
Store an admin user |
void |
store(LuteceDefaultAdminUser user)
Store an admin user |
void |
storeUsersRole(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 |
Constructor Detail |
---|
public AdminUserDAO()
Method Detail |
---|
public AdminUser load(int nUserId)
IAdminUserDAO
load
in interface IAdminUserDAO
nUserId
- th user id
public AdminUser selectUserByAccessCode(java.lang.String strUserAccessCode)
IAdminUserDAO
selectUserByAccessCode
in interface IAdminUserDAO
strUserAccessCode
- the login
public java.util.Collection<AdminUser> selectUserList()
selectUserList
in interface IAdminUserDAO
public int newPrimaryKey()
newPrimaryKey
in interface IAdminUserDAO
public void insert(AdminUser user)
insert
in interface IAdminUserDAO
user
- The AdminUserpublic void store(AdminUser user)
store
in interface IAdminUserDAO
user
- The AdminUserpublic void delete(int nUserId)
delete
in interface IAdminUserDAO
nUserId
- the user idpublic java.util.Map<java.lang.String,Right> selectRightsListForUser(int nUserId)
selectRightsListForUser
in interface IAdminUserDAO
nUserId
- the id of the user to retrieve rights
public void insertRightsListForUser(int nUserId, java.lang.String strRightId)
insertRightsListForUser
in interface IAdminUserDAO
nUserId
- the user idstrRightId
- the right idpublic void deleteAllRightsForUser(int nUserId)
deleteAllRightsForUser
in interface IAdminUserDAO
nUserId
- the user idpublic java.util.Map<java.lang.String,AdminRole> selectRolesListForUser(int nUserId)
selectRolesListForUser
in interface IAdminUserDAO
nUserId
- the id of the user to retrieve roles
public void insertRolesListForUser(int nUserId, java.lang.String strRoleKey)
insertRolesListForUser
in interface IAdminUserDAO
nUserId
- the user idstrRoleKey
- the key rolepublic void deleteAllRolesForUser(int nUserId)
deleteAllRolesForUser
in interface IAdminUserDAO
nUserId
- the user idpublic boolean checkRoleAttributed(java.lang.String strRoleKey)
checkRoleAttributed
in interface IAdminUserDAO
strRoleKey
- the role key to check
public int checkAccessCodeAlreadyInUse(java.lang.String strAccessCode)
checkAccessCodeAlreadyInUse
in interface IAdminUserDAO
strAccessCode
- The access code
public int checkEmailAlreadyInUse(java.lang.String strEmail)
checkEmailAlreadyInUse
in interface IAdminUserDAO
strEmail
- The email
public void insert(LuteceDefaultAdminUser user)
insert
in interface IAdminUserDAO
user
- The AdminUserpublic void store(LuteceDefaultAdminUser user)
store
in interface IAdminUserDAO
user
- The AdminUserpublic LuteceDefaultAdminUser loadDefaultAdminUser(int nUserId)
loadDefaultAdminUser
in interface IAdminUserDAO
nUserId
- the user id
public java.util.Collection<AdminUser> selectUsersByRole(java.lang.String strRoleKey)
selectUsersByRole
in interface IAdminUserDAO
strRoleKey
- The role
public java.util.Collection<AdminUser> selectUsersByLevel(int nIdLevel)
selectUsersByLevel
in interface IAdminUserDAO
nIdLevel
- The level
public void deleteAllOwnRightsForUser(int nUserId, int nUserLevel)
deleteAllOwnRightsForUser
in interface IAdminUserDAO
nUserId
- the user idnUserLevel
- the user levelpublic void deleteAllDelegatedRightsForUser(int nUserId, int nUserLevel)
deleteAllDelegatedRightsForUser
in interface IAdminUserDAO
nUserId
- the user idnUserLevel
- the user levelpublic void storeUsersRole(java.lang.String strOldRoleKey, AdminRole role)
storeUsersRole
in interface IAdminUserDAO
strRoleKey
- The old role key namerole
- The new role keypublic boolean hasRole(int nUserId, java.lang.String strRoleKey)
hasRole
in interface IAdminUserDAO
nUserId
- The ID of the userstrRoleKey
- The role Key
public void deleteRoleForUser(int nUserId, java.lang.String strRoleKey)
deleteRoleForUser
in interface IAdminUserDAO
nUserId
- The ID of the userstrRoleKey
- The role keypublic java.util.Collection<AdminUser> selectUsersByFilter(AdminUserFilter auFilter)
selectUsersByFilter
in interface IAdminUserDAO
auFilter
- The filter
public java.util.Collection<AdminUser> selectUsersByRight(java.lang.String strIdRight)
selectUsersByRight
in interface IAdminUserDAO
strIdRight
- The ID right
public boolean hasRight(int nUserId, java.lang.String strIdRight)
hasRight
in interface IAdminUserDAO
nUserId
- The ID of the userstrIdRight
- The ID right
public void deleteRightForUser(int nUserId, java.lang.String strIdRight)
deleteRightForUser
in interface IAdminUserDAO
nUserId
- The user IDstrIdRight
- The right ID
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |