Class ConnectionLogDAO
java.lang.Object
fr.paris.lutece.plugins.mylutece.authentication.logs.ConnectionLogDAO
- All Implemented Interfaces:
IConnectionLogDAO
This class provides Data Access methods for AppUser objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinsertLog(ConnectionLog connectionLog, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the table of connectionsvoidresetConnectionLogs(String strIp, Timestamp dateLogin, int nIntervalMinutes, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update connection logs of an IP to allow the user to login.intselectLoginErrors(ConnectionLog connectionLog, int nIntervalMinutes, fr.paris.lutece.portal.service.plugin.Plugin plugin) Calculate the number of connections with a given ip_address by a determinate time
-
Constructor Details
-
ConnectionLogDAO
public ConnectionLogDAO()
-
-
Method Details
-
selectLoginErrors
public int selectLoginErrors(ConnectionLog connectionLog, int nIntervalMinutes, fr.paris.lutece.portal.service.plugin.Plugin plugin) Calculate the number of connections with a given ip_address by a determinate time- Specified by:
selectLoginErrorsin interfaceIConnectionLogDAO- Parameters:
connectionLog- The Log of connectionnIntervalMinutes- The number of minutes since the last connectionplugin- The plugin- Returns:
- int The number of loggin error during the last nIntervalMinutes minutes
-
insertLog
public void insertLog(ConnectionLog connectionLog, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the table of connections- Specified by:
insertLogin interfaceIConnectionLogDAO- Parameters:
connectionLog- the ConnectionLog Objectplugin- The plugin
-
resetConnectionLogs
public void resetConnectionLogs(String strIp, Timestamp dateLogin, int nIntervalMinutes, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update connection logs of an IP to allow the user to login.- Specified by:
resetConnectionLogsin interfaceIConnectionLogDAO- Parameters:
strIp- Ip to cleandateLogin- Date of the last login. Anly logs between this date plus or minus the minute interval will be cleared.nIntervalMinutes- Minutes intervalplugin- The plugin
-