Class UserLoginInfo
- java.lang.Object
-
- com.atlassian.confluence.security.persistence.dao.hibernate.UserLoginInfo
-
- All Implemented Interfaces:
HistoricalLoginInfo,Serializable
public class UserLoginInfo extends Object implements Serializable, HistoricalLoginInfo
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserLoginInfo()UserLoginInfo(ConfluenceUser user)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfailedLogin(Date date)Record a failed login attempt ondate.intgetCurrentFailedLoginCount()Return the number of failed login attempts for the user.longgetId()DategetLastFailedLoginDate()DategetLastSuccessfulLoginDate()DategetPreviousSuccessfulLoginDate()intgetTotalFailedLoginCount()ConfluenceUsergetUser()voidresetFailedLoginCount()voidsetCurrentFailedLoginCount(int currentFailedLoginCount)voidsetLastFailedLoginDate(Date lastFailedLoginDate)voidsetLastSuccessfulLoginDate(Date lastSuccessfulLoginDate)voidsetPreviousSuccessfulLoginDate(Date previousSuccessfulLoginDate)voidsetTotalFailedLoginCount(int totalFailedLoginCount)voidsuccessfulLogin(Date date)Record a successful login that occurred ondate.
-
-
-
Constructor Detail
-
UserLoginInfo
public UserLoginInfo()
-
UserLoginInfo
public UserLoginInfo(ConfluenceUser user)
- Since:
- 5.2
-
-
Method Detail
-
successfulLogin
public void successfulLogin(Date date)
Record a successful login that occurred ondate.- Parameters:
date-
-
failedLogin
public void failedLogin(Date date)
Record a failed login attempt ondate.- Parameters:
date-
-
resetFailedLoginCount
public void resetFailedLoginCount()
-
getPreviousSuccessfulLoginDate
public Date getPreviousSuccessfulLoginDate()
- Specified by:
getPreviousSuccessfulLoginDatein interfaceHistoricalLoginInfo- Returns:
- the date of the previous successful login (not including the login that started the current session) or null if its not been recorded
-
getId
public long getId()
-
getUser
public ConfluenceUser getUser()
- Since:
- 5.2
-
getCurrentFailedLoginCount
public int getCurrentFailedLoginCount()
Description copied from interface:HistoricalLoginInfoReturn the number of failed login attempts for the user.- Specified by:
getCurrentFailedLoginCountin interfaceHistoricalLoginInfo- Returns:
- number of failed login attempts
-
getTotalFailedLoginCount
public int getTotalFailedLoginCount()
- Specified by:
getTotalFailedLoginCountin interfaceHistoricalLoginInfo- Returns:
- the number of total number of times the user has failed to login ever or -1 if its not recorded
-
getLastSuccessfulLoginDate
public Date getLastSuccessfulLoginDate()
- Specified by:
getLastSuccessfulLoginDatein interfaceHistoricalLoginInfo- Returns:
- the date of the last successful login (including the login that started to the current session) or null if its not been recorded
-
getLastFailedLoginDate
public Date getLastFailedLoginDate()
- Specified by:
getLastFailedLoginDatein interfaceHistoricalLoginInfo- Returns:
- the date of the last failed login or null if its not known
-
setCurrentFailedLoginCount
public void setCurrentFailedLoginCount(int currentFailedLoginCount)
-
setTotalFailedLoginCount
public void setTotalFailedLoginCount(int totalFailedLoginCount)
-
setLastSuccessfulLoginDate
public void setLastSuccessfulLoginDate(Date lastSuccessfulLoginDate)
-
setPreviousSuccessfulLoginDate
public void setPreviousSuccessfulLoginDate(Date previousSuccessfulLoginDate)
-
setLastFailedLoginDate
public void setLastFailedLoginDate(Date lastFailedLoginDate)
-
-