|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAdminUserDAO
AdminUserDAO Interface
Method Summary | |
---|---|
int |
checkAccessCodeAlreadyInUse(String strAccessCode)
Checks the availibility of an access code |
int |
checkEmailAlreadyInUse(String strEmail)
Checks the availibility of an email |
boolean |
checkRoleAttributed(String strRoleKey)
Checks wether the role is in use or not |
int |
countUserPasswordHistoryFromDate(Timestamp minDate,
int nUserId)
Get the number of password change done by a user since the given date. |
void |
delete(int nUserId)
Delete an user |
void |
deleteAllDelegatedRightsForUser(int nUserId,
int nUserLevel)
Deletes rights delegated by user ie rights with level < userlevel |
void |
deleteAllOwnRightsForUser(int nUserId,
int nUserLevel)
Deletes all rights owned by user ie rights with level >= userlevel |
void |
deleteAllRightsForUser(int nUserId)
Delete all rights owned by an user |
void |
deleteAllRolesForUser(int nUserId)
Remove all rights from an user |
void |
deleteRightForUser(int nUserId,
String strIdRight)
Remove a right for an user |
void |
deleteRoleForUser(int nUserId,
String strRoleKey)
Remove role for an user |
List<Integer> |
findAllExpiredUserId()
Get the list of id of user with the expired status. |
List<Integer> |
getIdUsersToSendFirstAlert(Timestamp alertMaxDate)
Get the list of id of users that need to receive their first alert |
List<Integer> |
getIdUsersToSendOtherAlert(Timestamp alertMaxDate,
Timestamp timeBetweenAlerts,
int maxNumberAlerts)
Get the list of id of users that need to receive their first alert |
List<Integer> |
getIdUsersWithExpiredLifeTimeList(Timestamp currentTimestamp)
Get the list of id of users that have an expired time life but not the expired status |
List<Integer> |
getIdUsersWithExpiredPasswordsList(Timestamp currentTimestamp)
Get the list of id of users that have an expired password but not the change password flag |
boolean |
hasRight(int nUserId,
String strIdRight)
Check if the user has the given right |
boolean |
hasRole(int nUserId,
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 |
insertNewPasswordInHistory(String strPassword,
int nUserId)
Log a password change in the password history |
void |
insertRightsListForUser(int nUserId,
String strRightId)
Add a right to an user |
void |
insertRolesListForUser(int nUserId,
String strRoleKey)
Gives a role to an user |
AdminUser |
load(int nUserId)
Load an AdminUser |
LuteceDefaultAdminUser |
loadDefaultAdminUser(int nUserId)
Load a default AdminUser |
int |
newPrimaryKey()
Generates a new primary key |
void |
removeAllPasswordHistoryForUser(int nUserId)
Remove every password saved in the password history for a given user. |
Map<String,Boolean> |
selectAnonymizationStatusUserStaticField()
Get a map of anonymization status of a user field. |
Map<String,Right> |
selectRightsListForUser(int nUserId)
Get the right list associated to a given user id |
Map<String,AdminRole> |
selectRolesListForUser(int nUserId)
Get the role list associated to a given user id |
AdminUser |
selectUserByAccessCode(String strUserAccessCode)
Get an user by its access code (login) |
String |
selectUserByEmail(String strEmail)
Get the user access code from its email. |
Collection<AdminUser> |
selectUserList()
Gets the collection of all AdminUsers |
List<String> |
selectUserPasswordHistory(int nUserID)
Gets the history of password of the given user |
Collection<AdminUser> |
selectUsersByFilter(AdminUserFilter auFilter)
Select users by filter |
Collection<AdminUser> |
selectUsersByLevel(int nIdLevel)
Select all user that own a given level |
Collection<AdminUser> |
selectUsersByRight(String strIdRight)
Get all users having a given right |
Collection<AdminUser> |
selectUsersByRole(String strRoleKey)
Gets a collection of AdminUser that share a given role |
void |
store(AdminUser user)
Update AdminUser data |
void |
store(LuteceDefaultAdminUser user)
Update AdminUser data |
void |
storeUsersRole(String strOldRoleKey,
AdminRole role)
Update role key if role key name has change |
void |
updateAnonymizationStatusUserStaticField(String strFieldName,
boolean bAnonymizeFiled)
Update the anonymization status of a user field. |
void |
updateChangePassword(List<Integer> listIdUser)
Set the "change password" flag of users to true |
void |
updateDateLastLogin(int nIdUser,
Timestamp dateLastLogin)
Update the admin user last login date. |
void |
updateNbAlert(List<Integer> listIdUser)
Increment the number of alert send to users by 1 |
void |
updateUserExpirationDate(int nIdUser,
Timestamp newExpirationDate)
Update the admin user expiration date with the new values. |
void |
updateUserStatus(List<Integer> listIdUser,
int nNewStatus)
Update status of a list of user accounts |
Method Detail |
---|
int checkAccessCodeAlreadyInUse(String strAccessCode)
strAccessCode
- The access code
int checkEmailAlreadyInUse(String strEmail)
strEmail
- The email
boolean checkRoleAttributed(String strRoleKey)
strRoleKey
- the role key to check
void delete(int nUserId)
nUserId
- the user idvoid deleteAllDelegatedRightsForUser(int nUserId, int nUserLevel)
nUserId
- the user idnUserLevel
- the user levelvoid deleteAllOwnRightsForUser(int nUserId, int nUserLevel)
nUserId
- the user idnUserLevel
- the user levelvoid deleteAllRightsForUser(int nUserId)
nUserId
- the user idvoid deleteAllRolesForUser(int nUserId)
nUserId
- the user idvoid insert(AdminUser user)
user
- The AdminUservoid insert(LuteceDefaultAdminUser user)
user
- The AdminUservoid insertRightsListForUser(int nUserId, String strRightId)
nUserId
- the user idstrRightId
- the right idvoid insertRolesListForUser(int nUserId, String strRoleKey)
nUserId
- the user idstrRoleKey
- the key roleAdminUser load(int nUserId)
nUserId
- the user id
LuteceDefaultAdminUser loadDefaultAdminUser(int nUserId)
nUserId
- the user id
int newPrimaryKey()
Map<String,Right> selectRightsListForUser(int nUserId)
nUserId
- the id of the user to retrieve rights
Map<String,AdminRole> selectRolesListForUser(int nUserId)
nUserId
- the id of the user to retrieve roles
AdminUser selectUserByAccessCode(String strUserAccessCode)
strUserAccessCode
- the login
String selectUserByEmail(String strEmail)
strEmail
- The email
Collection<AdminUser> selectUserList()
Collection<AdminUser> selectUsersByRole(String strRoleKey)
strRoleKey
- The role key
void store(AdminUser user)
user
- The AdminUservoid store(LuteceDefaultAdminUser user)
user
- The AdminUserCollection<AdminUser> selectUsersByLevel(int nIdLevel)
nIdLevel
- The level
void storeUsersRole(String strOldRoleKey, AdminRole role)
strOldRoleKey
- The old role key namerole
- The new roleboolean hasRole(int nUserId, String strRoleKey)
nUserId
- The ID of the userstrRoleKey
- The role Key
void deleteRoleForUser(int nUserId, String strRoleKey)
nUserId
- The ID of the userstrRoleKey
- The role keyCollection<AdminUser> selectUsersByFilter(AdminUserFilter auFilter)
auFilter
- the filter
Collection<AdminUser> selectUsersByRight(String strIdRight)
strIdRight
- The ID right
boolean hasRight(int nUserId, String strIdRight)
nUserId
- The ID of the userstrIdRight
- The ID right
void deleteRightForUser(int nUserId, String strIdRight)
nUserId
- The user IDstrIdRight
- The right IDList<String> selectUserPasswordHistory(int nUserID)
nUserID
- Id of the user
int countUserPasswordHistoryFromDate(Timestamp minDate, int nUserId)
minDate
- Minimum date to consider.nUserId
- Id of the user
void insertNewPasswordInHistory(String strPassword, int nUserId)
strPassword
- New password of the usernUserId
- Id of the uservoid removeAllPasswordHistoryForUser(int nUserId)
nUserId
- Id of the userMap<String,Boolean> selectAnonymizationStatusUserStaticField()
void updateAnonymizationStatusUserStaticField(String strFieldName, boolean bAnonymizeFiled)
strFieldName
- Name of the field to updatebAnonymizeFiled
- True if the field should be anonymized, false otherwiseList<Integer> findAllExpiredUserId()
List<Integer> getIdUsersWithExpiredLifeTimeList(Timestamp currentTimestamp)
currentTimestamp
- Timestamp describing the current time.
List<Integer> getIdUsersToSendFirstAlert(Timestamp alertMaxDate)
alertMaxDate
- The maximum date to send alerts.
List<Integer> getIdUsersToSendOtherAlert(Timestamp alertMaxDate, Timestamp timeBetweenAlerts, int maxNumberAlerts)
alertMaxDate
- The maximum date to send alerts.timeBetweenAlerts
- Timestamp describing the time between two alerts.maxNumberAlerts
- Maximum number of alerts to send to a user
List<Integer> getIdUsersWithExpiredPasswordsList(Timestamp currentTimestamp)
currentTimestamp
- Timestamp describing the current time.
void updateUserStatus(List<Integer> listIdUser, int nNewStatus)
listIdUser
- List of user accounts to updatenNewStatus
- New status of the uservoid updateNbAlert(List<Integer> listIdUser)
listIdUser
- The list of users to updatevoid updateChangePassword(List<Integer> listIdUser)
listIdUser
- The list of users to updatevoid updateUserExpirationDate(int nIdUser, Timestamp newExpirationDate)
nIdUser
- Id of the admin user to updatenewExpirationDate
- New expiration date of the uservoid updateDateLastLogin(int nIdUser, Timestamp dateLastLogin)
nIdUser
- Id of the admin user to updatedateLastLogin
- New last login date of the user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |