com.atlassian.bamboo.user
Class PasswordResetTokenImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.user.PasswordResetTokenImpl
All Implemented Interfaces:
BambooIdProvider, BambooObject, PasswordResetToken, java.lang.Cloneable

public class PasswordResetTokenImpl
extends BambooEntityObject
implements PasswordResetToken


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
protected PasswordResetTokenImpl()
          Only used by Hibernate.
  PasswordResetTokenImpl(java.lang.String userName)
          Creates new token and initializes it to random 50-char string and current time.
 
Method Summary
 void generate()
          Create new value of token and reset creation date to current time.
 java.lang.String getToken()
           
 java.sql.Timestamp getTokenCreationTime()
           
 java.lang.String getUserName()
           
protected  void setToken(java.lang.String token)
           
protected  void setTokenCreationTime(java.sql.Timestamp tokenCreationTime)
           
 void setUserName(java.lang.String userName)
           
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getLastModificationDate, hashCode, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordResetTokenImpl

protected PasswordResetTokenImpl()
Only used by Hibernate.


PasswordResetTokenImpl

public PasswordResetTokenImpl(java.lang.String userName)
Creates new token and initializes it to random 50-char string and current time.

Parameters:
userName - login name of a user
Method Detail

getToken

@NotNull
public java.lang.String getToken()
Specified by:
getToken in interface PasswordResetToken
Returns:
value of a token

setToken

protected void setToken(@NotNull
                        java.lang.String token)

getTokenCreationTime

@NotNull
public java.sql.Timestamp getTokenCreationTime()
Specified by:
getTokenCreationTime in interface PasswordResetToken
Returns:
time of creation

setTokenCreationTime

protected void setTokenCreationTime(@NotNull
                                    java.sql.Timestamp tokenCreationTime)

getUserName

public java.lang.String getUserName()
Specified by:
getUserName in interface PasswordResetToken
Returns:
user login name

setUserName

public void setUserName(java.lang.String userName)

generate

public void generate()
Description copied from interface: PasswordResetToken
Create new value of token and reset creation date to current time.

Specified by:
generate in interface PasswordResetToken


Copyright © 2012 Atlassian. All Rights Reserved.