public class AuthenticationEventManager
extends java.lang.Object
LoginEvent
Constructor and Description |
---|
AuthenticationEventManager() |
Modifier and Type | Method and Description |
---|---|
static LoginEvent |
createLoginEvent(Member member,
java.util.Date date)
Create a new LoginEvent in the db for the specified information
|
static void |
deleteOldestLoginEvents(Member member,
int numberOfEventToKeep)
Delete oldest LoginEvents of the specified member, keeping only
the number of event specified.
|
static java.util.List<LoginEvent> |
getAllLoginEvents(Member member)
Retrieve all LoginEvent of the specified member.
|
static LoginEvent |
getLastLoginEvent(Member member)
Retrieve the last LoginEvent of the specified member
|
static void |
migrateLastLoginDateFromExtraDBDataToLoginEvent()
Migrate all existing Member's ExtraDBData previously used to store login date,
into new LoginEvent objects.
|
public static final LoginEvent createLoginEvent(Member member, java.util.Date date)
member
- the member for which event is createddate
- the login date to be recorded (create time is used if null specified)public static final LoginEvent getLastLoginEvent(Member member)
member
- the Member for which the LoginEvent must be retrieved (must not be null, otherwise null is return)public static final java.util.List<LoginEvent> getAllLoginEvents(Member member)
member
- the Member for which the LoginEvent must be retrieved (must not be null, otherwise empty list is return)public static void deleteOldestLoginEvents(Member member, int numberOfEventToKeep)
member
- the Member for which the old LoginEvent are to be deleted (must not be null, otherwise nothing is performed)numberOfEventToKeep
- the number of event to keep (wow no kidding ! that's a really helpful javadoc :p)public static void migrateLastLoginDateFromExtraDBDataToLoginEvent()
Processes performed by this method can be disabled with the following property :
member.migrate-last-login-date: false
This method will starts its own transaction.
Copyright © 2001-2019 Jalios SA. All Rights Reserved.