fr.paris.lutece.plugins.mylutece.modules.directory.authentication.business
Interface IMyluteceDirectoryUserDAO

All Known Implementing Classes:
MyluteceDirectoryUserDAO

public interface IMyluteceDirectoryUserDAO

Author:
Etienne

Method Summary
 boolean checkActivated(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if user is activated
 boolean checkPassword(java.lang.String strLogin, java.lang.String strPassword, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check the password for a DirectoryUser
 int countUserPasswordHistoryFromDate(java.sql.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(MyluteceDirectoryUser directoryUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 java.util.List<java.lang.Integer> findAllExpiredUserId(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of id of user with the expired status.
 int findIdRecordFromLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get a user id from his login
 java.util.List<java.lang.Integer> getIdUsersToSendFirstAlert(java.sql.Timestamp alertMaxDate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of id of users that need to receive their first alert
 java.util.List<java.lang.Integer> getIdUsersToSendOtherAlert(java.sql.Timestamp alertMaxDate, java.sql.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
 java.util.List<java.lang.Integer> getIdUsersWithExpiredLifeTimeList(java.sql.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
 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(MyluteceDirectoryUser directoryUser, java.lang.String strPassword, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 void insertNewPasswordInHistory(java.lang.String strPassword, int nUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Log a password change in the password history
 MyluteceDirectoryUser load(int nIdRecord, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of DirectoryUser from the table
 void removeAllPasswordHistoryForUser(int nUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove every password saved in the password history for a user.
 java.util.Collection<MyluteceDirectoryUser> selectDirectoryUserList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of directoryUsers
 java.util.Collection<MyluteceDirectoryUser> selectDirectoryUserListForLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of DirectoryUsers for a login
 java.lang.String selectPasswordByPrimaryKey(int nIdRecord, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the password of the specified user
 java.util.List<java.lang.String> selectUserPasswordHistory(int nUserID, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Gets the history of password of the given user
 void store(MyluteceDirectoryUser directoryUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 void updateNbAlert(java.util.List<java.lang.Integer> listIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Increment the number of alert send to users by 1
 void updatePassword(MyluteceDirectoryUser directoryUser, java.lang.String strNewPassword, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 void updateResetPassword(MyluteceDirectoryUser user, boolean bNewValue, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update of the databaseUser which is specified in parameter
 void updateUserExpirationDate(int nIdUser, java.sql.Timestamp newExpirationDate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the user expiration date with the new values.
 void updateUserStatus(java.util.List<java.lang.Integer> idUserList, int nNewStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update status of a list of user accounts
 

Method Detail

insert

void insert(MyluteceDirectoryUser directoryUser,
            java.lang.String strPassword,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Parameters:
directoryUser - The directoryUser object
strPassword - The user password
plugin - The Plugin using this data access service

load

MyluteceDirectoryUser load(int nIdRecord,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of DirectoryUser from the table

Parameters:
nIdRecord - The identifier of User
plugin - The Plugin using this data access service
Returns:
the instance of the DirectoryUser

delete

void delete(MyluteceDirectoryUser directoryUser,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Parameters:
directoryUser - The directoryUser object
plugin - The Plugin using this data access service

store

void store(MyluteceDirectoryUser directoryUser,
           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Parameters:
directoryUser - The reference of directoryUser
plugin - The Plugin using this data access service

updatePassword

void updatePassword(MyluteceDirectoryUser directoryUser,
                    java.lang.String strNewPassword,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Parameters:
directoryUser - The reference of directoryUser
strNewPassword - The new password to store
plugin - The Plugin using this data access service

updateResetPassword

void updateResetPassword(MyluteceDirectoryUser user,
                         boolean bNewValue,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update of the databaseUser which is specified in parameter

Parameters:
databaseUser - The instance of the DatabaseUser which contains the data to store
bNewValue - New value of the reset password property
plugin - The current plugin using this method

selectPasswordByPrimaryKey

java.lang.String selectPasswordByPrimaryKey(int nIdRecord,
                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the password of the specified user

Parameters:
nIdRecord - The Primary key of the directoryUser
plugin - The current plugin using this method
Returns:
String the user password

selectDirectoryUserList

java.util.Collection<MyluteceDirectoryUser> selectDirectoryUserList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of directoryUsers

Parameters:
plugin - The Plugin using this data access service
Returns:
The Collection of the directoryUsers

selectDirectoryUserListForLogin

java.util.Collection<MyluteceDirectoryUser> selectDirectoryUserListForLogin(java.lang.String strLogin,
                                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of DirectoryUsers for a login

Parameters:
strLogin - The login of DirectoryUser
plugin - The Plugin using this data access service
Returns:
The Collection of the DirectoryUsers

checkPassword

boolean checkPassword(java.lang.String strLogin,
                      java.lang.String strPassword,
                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check the password for a DirectoryUser

Parameters:
strLogin - The user login of DirectoryUser
strPassword - The password of DirectoryUser
plugin - The Plugin using this data access service
Returns:
true if password is ok

checkActivated

boolean checkActivated(java.lang.String strLogin,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if user is activated

Parameters:
strLogin - The user login of DirectoryUser
plugin - The Plugin using this data access service
Returns:
true if user is activated

findIdRecordFromLogin

int findIdRecordFromLogin(java.lang.String strLogin,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get a user id from his login

Parameters:
strLogin - The login of the user
plugin - The Plugin
Returns:
The user id, or 0 if no user has this login.

selectUserPasswordHistory

java.util.List<java.lang.String> selectUserPasswordHistory(int nUserID,
                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Gets the history of password of the given user

Parameters:
nUserID - Id of the user
plugin - The Plugin
Returns:
The collection of recent passwords used by the user.

countUserPasswordHistoryFromDate

int countUserPasswordHistoryFromDate(java.sql.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.

Parameters:
minDate - Minimum date to consider.
nUserId - Id of the user
plugin - The Plugin
Returns:
The number of password change done by the user since the given date.

insertNewPasswordInHistory

void insertNewPasswordInHistory(java.lang.String strPassword,
                                int nUserId,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Log a password change in the password history

Parameters:
strPassword - New password of the user
nUserId - Id of the user
plugin - The Plugin

removeAllPasswordHistoryForUser

void removeAllPasswordHistoryForUser(int nUserId,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove every password saved in the password history for a user.

Parameters:
nUserId - Id of the user
plugin - The Plugin

findAllExpiredUserId

java.util.List<java.lang.Integer> findAllExpiredUserId(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of user with the expired status.

Parameters:
plugin - The Plugin
Returns:
The list of if of user with the expired status.

getIdUsersWithExpiredLifeTimeList

java.util.List<java.lang.Integer> getIdUsersWithExpiredLifeTimeList(java.sql.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

Parameters:
currentTimestamp - Timestamp describing the current time.
plugin - The Plugin
Returns:
the list of id of users with expired time life

getIdUsersToSendFirstAlert

java.util.List<java.lang.Integer> getIdUsersToSendFirstAlert(java.sql.Timestamp alertMaxDate,
                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of id of users that need to receive their first alert

Parameters:
alertMaxDate - The maximum date to send alerts.
plugin - The Plugin
Returns:
the list of id of users that need to receive their first alert

getIdUsersToSendOtherAlert

java.util.List<java.lang.Integer> getIdUsersToSendOtherAlert(java.sql.Timestamp alertMaxDate,
                                                             java.sql.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

Parameters:
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
plugin - The Plugin
Returns:
the list of id of users that need to receive their first alert

updateUserStatus

void updateUserStatus(java.util.List<java.lang.Integer> idUserList,
                      int nNewStatus,
                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update status of a list of user accounts

Parameters:
idUserList - List of user accounts to update
nNewStatus - New status of the user
plugin - The Plugin

updateNbAlert

void updateNbAlert(java.util.List<java.lang.Integer> listIdUser,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Increment the number of alert send to users by 1

Parameters:
listIdUser - The list of users to update
plugin - The Plugin

updateUserExpirationDate

void updateUserExpirationDate(int nIdUser,
                              java.sql.Timestamp newExpirationDate,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the user expiration date with the new values. Also update his alert account to 0

Parameters:
nIdUser - Id of the user to update
newExpirationDate - Id of the user to update
plugin - The Plugin

getNbAccountLifeTimeNotification

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

Parameters:
nIdUser - Id of the user
plugin - The plugin
Returns:
The number of notification send to the user


Copyright © 2012 Mairie de Paris. All Rights Reserved.