com.atlassian.confluence.security.persistence.dao.hibernate
Class UserLoginInfo

java.lang.Object
  extended by com.atlassian.confluence.security.persistence.dao.hibernate.UserLoginInfo
All Implemented Interfaces:
HistoricalLoginInfo, java.io.Serializable

public class UserLoginInfo
extends java.lang.Object
implements java.io.Serializable, HistoricalLoginInfo

See Also:
Serialized Form

Constructor Summary
UserLoginInfo()
           
UserLoginInfo(ConfluenceUser user)
           
UserLoginInfo(java.lang.String userName)
          Deprecated. since 5.2. See UserLoginInfo(ConfluenceUser)
 
Method Summary
 void failedLogin(java.util.Date date)
          Record a failed login attempt on date.
 int getCurrentFailedLoginCount()
          Return the number of failed login attempts for the user.
 long getId()
           
 java.util.Date getLastFailedLoginDate()
           
 java.util.Date getLastSuccessfulLoginDate()
           
 java.util.Date getPreviousSuccessfulLoginDate()
           
 int getTotalFailedLoginCount()
           
 ConfluenceUser getUser()
           
 java.lang.String getUserName()
          Deprecated. since 5.2. See getUser().
 void resetFailedLoginCount()
           
 void setCurrentFailedLoginCount(int currentFailedLoginCount)
           
 void setLastFailedLoginDate(java.util.Date lastFailedLoginDate)
           
 void setLastSuccessfulLoginDate(java.util.Date lastSuccessfulLoginDate)
           
 void setPreviousSuccessfulLoginDate(java.util.Date previousSuccessfulLoginDate)
           
 void setTotalFailedLoginCount(int totalFailedLoginCount)
           
 void successfulLogin(java.util.Date date)
          Record a successful login that occurred on date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserLoginInfo

public UserLoginInfo()

UserLoginInfo

@Deprecated
public UserLoginInfo(java.lang.String userName)
Deprecated. since 5.2. See UserLoginInfo(ConfluenceUser)

Parameters:
userName -

UserLoginInfo

public UserLoginInfo(ConfluenceUser user)
Since:
5.2
Method Detail

successfulLogin

public void successfulLogin(java.util.Date date)
Record a successful login that occurred on date.

Parameters:
date -

failedLogin

public void failedLogin(java.util.Date date)
Record a failed login attempt on date.

Parameters:
date -

resetFailedLoginCount

public void resetFailedLoginCount()

getPreviousSuccessfulLoginDate

public java.util.Date getPreviousSuccessfulLoginDate()
Specified by:
getPreviousSuccessfulLoginDate in interface HistoricalLoginInfo
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()

getUserName

@Deprecated
public java.lang.String getUserName()
Deprecated. since 5.2. See getUser().

Returns:
the username of the user

getUser

public ConfluenceUser getUser()
Since:
5.2

getCurrentFailedLoginCount

public int getCurrentFailedLoginCount()
Description copied from interface: HistoricalLoginInfo
Return the number of failed login attempts for the user.

Specified by:
getCurrentFailedLoginCount in interface HistoricalLoginInfo
Returns:
number of failed login attempts

getTotalFailedLoginCount

public int getTotalFailedLoginCount()
Specified by:
getTotalFailedLoginCount in interface HistoricalLoginInfo
Returns:
the number of total number of times the user has failed to login ever or -1 if its not recorded

getLastSuccessfulLoginDate

public java.util.Date getLastSuccessfulLoginDate()
Specified by:
getLastSuccessfulLoginDate in interface HistoricalLoginInfo
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 java.util.Date getLastFailedLoginDate()
Specified by:
getLastFailedLoginDate in interface HistoricalLoginInfo
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(java.util.Date lastSuccessfulLoginDate)

setPreviousSuccessfulLoginDate

public void setPreviousSuccessfulLoginDate(java.util.Date previousSuccessfulLoginDate)

setLastFailedLoginDate

public void setLastFailedLoginDate(java.util.Date lastFailedLoginDate)


Copyright © 2003-2013 Atlassian. All Rights Reserved.