Package com.atlassian.bamboo.user
Class PasswordResetTokenImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.user.PasswordResetTokenImpl
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,PasswordResetToken
,Cloneable
@Entity
public class PasswordResetTokenImpl
extends BambooEntityObject
implements PasswordResetToken
-
Constructor Summary
ModifierConstructorDescriptionprotected
Only used by Hibernate.PasswordResetTokenImpl
(String userName) Creates new token and initializes it to random 50-char string and current time. -
Method Summary
Modifier and TypeMethodDescriptionvoid
generate()
Create new value of token and reset creation date to current time.@NotNull String
getToken()
@NotNull Timestamp
protected void
protected void
setTokenCreationTime
(@NotNull Timestamp tokenCreationTime) void
setUserName
(String userName) Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getId, getLastModificationDate, hashCode, setClock, setCreationDate, setId, setLastModificationDate
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
PasswordResetTokenImpl
protected PasswordResetTokenImpl()Only used by Hibernate. -
PasswordResetTokenImpl
Creates new token and initializes it to random 50-char string and current time.- Parameters:
userName
- login name of a user
-
-
Method Details
-
getToken
- Specified by:
getToken
in interfacePasswordResetToken
- Returns:
- value of a token
-
setToken
-
getTokenCreationTime
- Specified by:
getTokenCreationTime
in interfacePasswordResetToken
- Returns:
- time of creation
-
setTokenCreationTime
-
getUserName
- Specified by:
getUserName
in interfacePasswordResetToken
- Returns:
- user login name
-
setUserName
-
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 interfacePasswordResetToken
-