fr.paris.lutece.plugins.mylutece.authentication.logs
Class ConnectionLogDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.authentication.logs.ConnectionLogDAO
All Implemented Interfaces:
IConnectionLogDAO

public final class ConnectionLogDAO
extends Object
implements IConnectionLogDAO

This class provides Data Access methods for AppUser objects


Constructor Summary
ConnectionLogDAO()
           
 
Method Summary
 void insertLog(ConnectionLog connectionLog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table of connections
 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.
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionLogDAO

public ConnectionLogDAO()
Method Detail

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:
selectLoginErrors in interface IConnectionLogDAO
Parameters:
connectionLog - The Log of connection
nIntervalMinutes - The number of minutes since the last connection
plugin - 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:
insertLog in interface IConnectionLogDAO
Parameters:
connectionLog - the ConnectionLog Object
plugin - 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:
resetConnectionLogs in interface IConnectionLogDAO
Parameters:
strIp - Ip to clean
dateLogin - Date of the last login. Anly logs between this date plus or minus the minute interval will be cleared.
nIntervalMinutes - Minutes interval
plugin - The plugin


Copyright © 2014 Mairie de Paris. All Rights Reserved.