|
||||||||||
| 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 | |
|---|---|
boolean |
checkAccessCodeAlreadyInUse(java.lang.String strAccessCode)
Check weather the access code already exists or not |
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 |
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> |
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 |
| 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 IAdminUserDAOnUserId - th user id
public AdminUser selectUserByAccessCode(java.lang.String strUserAccessCode)
IAdminUserDAO
selectUserByAccessCode in interface IAdminUserDAOstrUserAccessCode - the login
public java.util.Collection<AdminUser> selectUserList()
selectUserList in interface IAdminUserDAOpublic int newPrimaryKey()
newPrimaryKey in interface IAdminUserDAOpublic void insert(AdminUser user)
insert in interface IAdminUserDAOuser - The AdminUserpublic void store(AdminUser user)
store in interface IAdminUserDAOuser - The AdminUserpublic void delete(int nUserId)
delete in interface IAdminUserDAOnUserId - the user idpublic java.util.Map<java.lang.String,Right> selectRightsListForUser(int nUserId)
selectRightsListForUser in interface IAdminUserDAOnUserId - the id of the user to retrieve rights
public void insertRightsListForUser(int nUserId,
java.lang.String strRightId)
insertRightsListForUser in interface IAdminUserDAOnUserId - the user idstrRightId - the right idpublic void deleteAllRightsForUser(int nUserId)
deleteAllRightsForUser in interface IAdminUserDAOnUserId - the user idpublic java.util.Map<java.lang.String,AdminRole> selectRolesListForUser(int nUserId)
selectRolesListForUser in interface IAdminUserDAOnUserId - the id of the user to retrieve roles
public void insertRolesListForUser(int nUserId,
java.lang.String strRoleKey)
insertRolesListForUser in interface IAdminUserDAOnUserId - the user idstrRoleKey - the key rolepublic void deleteAllRolesForUser(int nUserId)
deleteAllRolesForUser in interface IAdminUserDAOnUserId - the user idpublic boolean checkRoleAttributed(java.lang.String strRoleKey)
checkRoleAttributed in interface IAdminUserDAOstrRoleKey - the role key to check
public boolean checkAccessCodeAlreadyInUse(java.lang.String strAccessCode)
checkAccessCodeAlreadyInUse in interface IAdminUserDAOstrAccessCode - The access code
public void insert(LuteceDefaultAdminUser user)
insert in interface IAdminUserDAOuser - The AdminUserpublic void store(LuteceDefaultAdminUser user)
store in interface IAdminUserDAOuser - The AdminUserpublic LuteceDefaultAdminUser loadDefaultAdminUser(int nUserId)
loadDefaultAdminUser in interface IAdminUserDAOnUserId - the user id
public java.util.Collection<AdminUser> selectUsersByRole(java.lang.String strRoleKey)
selectUsersByRole in interface IAdminUserDAOstrRoleKey - The role
public void deleteAllOwnRightsForUser(int nUserId,
int nUserLevel)
deleteAllOwnRightsForUser in interface IAdminUserDAOnUserId - the user idnUserLevel - the user level
public void deleteAllDelegatedRightsForUser(int nUserId,
int nUserLevel)
deleteAllDelegatedRightsForUser in interface IAdminUserDAOnUserId - the user idnUserLevel - the user level
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||