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
Constructors Modifier Constructor Description protected
PasswordResetTokenImpl()
Only used by Hibernate.PasswordResetTokenImpl(String userName)
Creates new token and initializes it to random 50-char string and current time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate()
Create new value of token and reset creation date to current time.@NotNull String
getToken()
@NotNull Timestamp
getTokenCreationTime()
String
getUserName()
protected void
setToken(@NotNull String token)
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 Detail
-
PasswordResetTokenImpl
protected PasswordResetTokenImpl()
Only used by Hibernate.
-
PasswordResetTokenImpl
public PasswordResetTokenImpl(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 @NotNull String getToken()
- Specified by:
getToken
in interfacePasswordResetToken
- Returns:
- value of a token
-
setToken
protected void setToken(@NotNull @NotNull String token)
-
getTokenCreationTime
@NotNull public @NotNull Timestamp getTokenCreationTime()
- Specified by:
getTokenCreationTime
in interfacePasswordResetToken
- Returns:
- time of creation
-
setTokenCreationTime
protected void setTokenCreationTime(@NotNull @NotNull Timestamp tokenCreationTime)
-
getUserName
public String getUserName()
- Specified by:
getUserName
in interfacePasswordResetToken
- Returns:
- user login name
-
setUserName
public void setUserName(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 interfacePasswordResetToken
-
-