public class DatabaseUserDAO extends Object implements IDatabaseUserDAO
Constructor and Description |
---|
DatabaseUserDAO() |
Modifier and Type | Method and Description |
---|---|
int |
countUserPasswordHistoryFromDate(Timestamp minDate,
int nUserId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the number of password change done by a user since the given date.
|
void |
delete(DatabaseUser databaseUser,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table
|
List<Integer> |
findAllExpiredUserId(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of user with the expired status.
|
int |
findDatabaseUserIdFromLogin(String strLogin,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get a user id from his login
|
List<Integer> |
getIdUsersToSendFirstAlert(Timestamp alertMaxDate,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of users that need to receive their first alert
|
List<Integer> |
getIdUsersToSendOtherAlert(Timestamp alertMaxDate,
Timestamp timeBetweenAlerts,
int maxNumberAlerts,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of users that need to receive their first alert
|
List<Integer> |
getIdUsersWithExpiredLifeTimeList(Timestamp currentTimestamp,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of users that have an expired time life but not the expired status
|
List<Integer> |
getIdUsersWithExpiredPasswordsList(Timestamp currentTimestamp,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of users that have an expired password but not the change password flag
|
int |
getNbAccountLifeTimeNotification(int nIdUser,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the number of notification send to a user to warn him about the expiration of his account
|
void |
insert(DatabaseUser databaseUser,
fr.paris.lutece.util.password.IPassword password,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.
|
void |
insertNewPasswordInHistory(fr.paris.lutece.util.password.IPassword password,
int nUserId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Log a password change in the password history
|
DatabaseUser |
load(int nUserId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of DatabaseUser from the table
|
fr.paris.lutece.util.password.IPassword |
loadPassword(String strLogin,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
load the password for a DatabaseUser
|
int |
newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key
|
void |
removeAllPasswordHistoryForUser(int nUserId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove every password saved in the password history for a user.
|
Collection<DatabaseUser> |
selectDatabaseUserList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of databaseUsers
|
Collection<DatabaseUser> |
selectDatabaseUserListForEmail(String strEmail,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of DatabaseUsers for a email
|
Collection<DatabaseUser> |
selectDatabaseUserListForLogin(String strLogin,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of DatabaseUsers for a login
|
List<DatabaseUser> |
selectDatabaseUsersListByFilter(DatabaseUserFilter duFilter,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of DatabaseUsers by a filter
|
List<fr.paris.lutece.util.password.IPassword> |
selectUserPasswordHistory(int nUserID,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Gets the history of password of the given user
|
void |
store(DatabaseUser databaseUser,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table
|
void |
updateChangePassword(List<Integer> listIdUser,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Set the "change password" flag of users to true
|
void |
updateNbAlert(List<Integer> listIdUser,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Increment the number of alert send to users by 1
|
void |
updatePassword(DatabaseUser databaseUser,
fr.paris.lutece.util.password.IPassword newPassword,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table
|
void |
updateResetPassword(DatabaseUser databaseUser,
boolean bNewValue,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table
|
void |
updateUserExpirationDate(int nIdUser,
Timestamp newExpirationDate,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the user expiration date with the new values.
|
void |
updateUserLastLoginDate(String strLogin,
Timestamp dateLastLogin,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a user last login date
|
void |
updateUserStatus(List<Integer> listIdUser,
int nNewStatus,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update status of a list of user accounts
|
public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
newPrimaryKey
in interface IDatabaseUserDAO
plugin
- The Plugin using this data access servicepublic void insert(DatabaseUser databaseUser, fr.paris.lutece.util.password.IPassword password, fr.paris.lutece.portal.service.plugin.Plugin plugin)
insert
in interface IDatabaseUserDAO
databaseUser
- The databaseUser objectpassword
- The user passwordplugin
- The Plugin using this data access servicepublic DatabaseUser load(int nUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
load
in interface IDatabaseUserDAO
nUserId
- The identifier of databaseUserplugin
- The Plugin using this data access servicepublic void delete(DatabaseUser databaseUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
delete
in interface IDatabaseUserDAO
databaseUser
- The databaseUser objectplugin
- The Plugin using this data access servicepublic void store(DatabaseUser databaseUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
store
in interface IDatabaseUserDAO
databaseUser
- The reference of databaseUserplugin
- The Plugin using this data access servicepublic void updatePassword(DatabaseUser databaseUser, fr.paris.lutece.util.password.IPassword newPassword, fr.paris.lutece.portal.service.plugin.Plugin plugin)
updatePassword
in interface IDatabaseUserDAO
databaseUser
- The reference of databaseUsernewPassword
- The new password to storeplugin
- The Plugin using this data access servicepublic void updateResetPassword(DatabaseUser databaseUser, boolean bNewValue, fr.paris.lutece.portal.service.plugin.Plugin plugin)
updateResetPassword
in interface IDatabaseUserDAO
databaseUser
- The reference of databaseUserbNewValue
- The new value of the resetPassword attributeplugin
- The Plugin using this data access servicepublic Collection<DatabaseUser> selectDatabaseUserList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectDatabaseUserList
in interface IDatabaseUserDAO
plugin
- The Plugin using this data access servicepublic Collection<DatabaseUser> selectDatabaseUserListForLogin(String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectDatabaseUserListForLogin
in interface IDatabaseUserDAO
strLogin
- The login of DatabaseUserplugin
- The Plugin using this data access servicepublic Collection<DatabaseUser> selectDatabaseUserListForEmail(String strEmail, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectDatabaseUserListForEmail
in interface IDatabaseUserDAO
strEmail
- The email of DatabaseUserplugin
- The Plugin using this data access servicepublic fr.paris.lutece.util.password.IPassword loadPassword(String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
loadPassword
in interface IDatabaseUserDAO
strLogin
- The user login of DatabaseUserplugin
- The Plugin using this data access servicepublic List<DatabaseUser> selectDatabaseUsersListByFilter(DatabaseUserFilter duFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectDatabaseUsersListByFilter
in interface IDatabaseUserDAO
duFilter
- filterplugin
- Pluginpublic int findDatabaseUserIdFromLogin(String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
findDatabaseUserIdFromLogin
in interface IDatabaseUserDAO
strLogin
- The login of the userplugin
- The pluginpublic List<fr.paris.lutece.util.password.IPassword> selectUserPasswordHistory(int nUserID, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectUserPasswordHistory
in interface IDatabaseUserDAO
nUserID
- Id of the userplugin
- The pluginpublic int countUserPasswordHistoryFromDate(Timestamp minDate, int nUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
countUserPasswordHistoryFromDate
in interface IDatabaseUserDAO
minDate
- Minimum date to consider.nUserId
- Id of the userplugin
- The pluginpublic void insertNewPasswordInHistory(fr.paris.lutece.util.password.IPassword password, int nUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
insertNewPasswordInHistory
in interface IDatabaseUserDAO
password
- New password of the usernUserId
- Id of the userplugin
- The pluginpublic void removeAllPasswordHistoryForUser(int nUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
removeAllPasswordHistoryForUser
in interface IDatabaseUserDAO
nUserId
- Id of the userplugin
- The pluginpublic List<Integer> findAllExpiredUserId(fr.paris.lutece.portal.service.plugin.Plugin plugin)
findAllExpiredUserId
in interface IDatabaseUserDAO
plugin
- The pluginpublic List<Integer> getIdUsersWithExpiredLifeTimeList(Timestamp currentTimestamp, fr.paris.lutece.portal.service.plugin.Plugin plugin)
getIdUsersWithExpiredLifeTimeList
in interface IDatabaseUserDAO
currentTimestamp
- Timestamp describing the current time.plugin
- The pluginpublic List<Integer> getIdUsersToSendFirstAlert(Timestamp alertMaxDate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
getIdUsersToSendFirstAlert
in interface IDatabaseUserDAO
alertMaxDate
- The maximum date to send alerts.plugin
- The pluginpublic List<Integer> getIdUsersToSendOtherAlert(Timestamp alertMaxDate, Timestamp timeBetweenAlerts, int maxNumberAlerts, fr.paris.lutece.portal.service.plugin.Plugin plugin)
getIdUsersToSendOtherAlert
in interface IDatabaseUserDAO
alertMaxDate
- The maximum date to send alerts.timeBetweenAlerts
- Timestamp describing the time between two alerts.maxNumberAlerts
- Maximum number of alerts to send to a userplugin
- The pluginpublic List<Integer> getIdUsersWithExpiredPasswordsList(Timestamp currentTimestamp, fr.paris.lutece.portal.service.plugin.Plugin plugin)
getIdUsersWithExpiredPasswordsList
in interface IDatabaseUserDAO
currentTimestamp
- Timestamp describing the current time.plugin
- The pluginpublic void updateUserStatus(List<Integer> listIdUser, int nNewStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin)
updateUserStatus
in interface IDatabaseUserDAO
listIdUser
- List of user accounts to updatenNewStatus
- New status of the userplugin
- The pluginpublic void updateNbAlert(List<Integer> listIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
updateNbAlert
in interface IDatabaseUserDAO
listIdUser
- The list of users to updateplugin
- The pluginpublic void updateChangePassword(List<Integer> listIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
updateChangePassword
in interface IDatabaseUserDAO
listIdUser
- The list of users to updateplugin
- The pluginpublic void updateUserExpirationDate(int nIdUser, Timestamp newExpirationDate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
updateUserExpirationDate
in interface IDatabaseUserDAO
nIdUser
- Id of the user to updatenewExpirationDate
- Id of the user to updateplugin
- The pluginpublic int getNbAccountLifeTimeNotification(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
getNbAccountLifeTimeNotification
in interface IDatabaseUserDAO
nIdUser
- Id of the userplugin
- The pluginpublic void updateUserLastLoginDate(String strLogin, Timestamp dateLastLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
updateUserLastLoginDate
in interface IDatabaseUserDAO
strLogin
- Login of the user to updatedateLastLogin
- date of the last login of the userplugin
- The pluginCopyright © 2018 City of Paris. All rights reserved.