public class ResetPasswordFactory extends HibernateFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXPIRE_TIME |
Modifier and Type | Method and Description |
---|---|
static ResetPassword |
createNewEntryFor(User u)
Create a new ResetPassword entry for the specified user
|
static int |
deleteUserTokens(java.lang.Long uid)
Remove all tokens for a specified user-id.
|
static org.apache.struts.action.ActionErrors |
findErrors(ResetPassword rp)
Report problems with a ResetPassword entity
|
static java.lang.String |
generateLink(ResetPassword rp)
Generate the URL for the specified ResetPassword token
|
static java.lang.String |
generatePasswordToken(User u)
Create a unique one-use token for a specified User
|
protected org.apache.log4j.Logger |
getLogger()
Get the Logger for the derived class so log messages show up on the
correct class
|
static void |
invalidateToken(java.lang.String token)
Invalidate the specified token in the DB
|
static int |
invalidateUserTokens(java.lang.Long uid)
Invalidate all tokens for a specified user-id
|
static ResetPassword |
lookupByToken(java.lang.String token)
Find a given ResetPassword entry by token.
|
static void |
save(ResetPassword rp)
Persist a RestPassword entity
|
addConfigurator, blobToByteArray, byteArrayToBlob, closeSession, closeSessionFactory, commitTransaction, createSessionFactory, createSessionFactory, executeCallableMode, executeSelectMode, getBlobContents, getByteArrayContents, getObject, getSession, initialize, inTransaction, isClosed, isInitialized, listObjectsByNamedQuery, listObjectsByNamedQuery, listObjectsByNamedQuery, lockObject, lookupObjectByNamedQuery, lookupObjectByNamedQuery, reload, removeObject, rollbackTransaction, saveObject, saveObject, stringToByteArray
public static final java.lang.String EXPIRE_TIME
protected org.apache.log4j.Logger getLogger()
HibernateFactory
getLogger
in class HibernateFactory
public static void save(ResetPassword rp)
rp
- ResetPassword to be persistedpublic static ResetPassword lookupByToken(java.lang.String token)
token
- token of interestpublic static int invalidateUserTokens(java.lang.Long uid)
uid
- user-id whose tokens are to be marked invalidpublic static int deleteUserTokens(java.lang.Long uid)
uid
- user-id whose tokens are to be deletedpublic static java.lang.String generatePasswordToken(User u)
u
- User whose password is to be resetpublic static ResetPassword createNewEntryFor(User u)
u
- User whose password is to be resetpublic static void invalidateToken(java.lang.String token)
token
- token to be marked as invalidpublic static java.lang.String generateLink(ResetPassword rp)
rp
- ResetPassword of interestpublic static org.apache.struts.action.ActionErrors findErrors(ResetPassword rp)
rp
- ResetPassword of interest