|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.kernel.UserAuthentication
Provides user authentication methods on a contained User object.
User
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
static String |
versionId
|
Method Summary | |
static UserAuthentication |
createForUser(BigDecimal userID)
Creates a UserAuthentication object for the user with the specified ID. |
static UserAuthentication |
createForUser(OID userOID)
Creates a UserAuthentication object for the user with the specified OID. |
static UserAuthentication |
createForUser(User user)
Creates a UserAuthentication object for a user. |
protected String |
getBaseDataObjectType()
Returns the base data object type for this domain object class. |
String |
getPasswordQuestion()
Retrieves the question used to reset the password for this user. |
User |
getUser()
Returns the User object to provide authentication
to. |
boolean |
isValidAnswer(String answer)
Determines whether the given answer matches the answer for this user. |
boolean |
isValidPassword(String password)
Determines whether the given password matches the password for this user. |
static UserAuthentication |
retrieveForLoginName(String loginName)
Retrieves a UserAuthentication object given a login name (currently, this is the primary email address of the user). |
static UserAuthentication |
retrieveForUser(BigDecimal userID)
Retrieves a UserAuthentication object for a user with the specified ID. |
static UserAuthentication |
retrieveForUser(OID userOID)
Retrieves a UserAuthentication object for the user with the specified OID. |
static UserAuthentication |
retrieveForUser(User user)
Retrieves a UserAuthentication object for a user. |
void |
setPassword(String password)
Sets the password for this user. |
void |
setPasswordAnswer(String answer)
Sets the answer to the password question for this user. |
void |
setPasswordQuestion(String question)
Sets the question used to reset the password for this user. |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, beforeSave, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, initialize, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String versionId
public static final String BASE_DATA_OBJECT_TYPE
Method Detail |
public static UserAuthentication retrieveForUser(User user) throws DataObjectNotFoundException
user
- the user for which to retrieve authentication
DataObjectNotFoundException
- if the specified user does not
have any associated user authentication object.public static UserAuthentication retrieveForUser(OID userOID) throws DataObjectNotFoundException
userOID
- the OID of the user for which to retrieve authentication
DataObjectNotFoundException
- if the specified user does not
have any associated user authentication object.public static UserAuthentication retrieveForUser(BigDecimal userID) throws DataObjectNotFoundException
userID
- The value of the ID property of the user for which to
retrieve authentication
DataObjectNotFoundException
- if the specified user does not
have any associated user authentication object.public static UserAuthentication retrieveForLoginName(String loginName) throws DataObjectNotFoundException
loginName
- the loginName of the user authentication object to
retrieve
DataObjectNotFoundException
- if the specified user does not
have any associated user authentication object.public static UserAuthentication createForUser(User user)
user
- the user for which to create a new user authentication
public static UserAuthentication createForUser(OID userOID) throws DataObjectNotFoundException
userOID
- the OID of the user for which to create a
new user authentication
DataObjectNotFoundException
public static UserAuthentication createForUser(BigDecimal userID) throws DataObjectNotFoundException
DataObjectNotFoundException
public User getUser()
User
object to provide authentication
to.
User
object to provide authentication
to.protected String getBaseDataObjectType()
DomainObject
getBaseDataObjectType
in class DomainObject
public void setPassword(String password)
password
- the new password for the user
IllegalArgumentException
- if the password is null or it has leading
or trailing spaces.public boolean isValidPassword(String password)
password
- the password to verify
true
if the password is valid; false
otherwise.
IllegalArgumentException
- if the password is null or if it has leading
or trailing spaces.public String getPasswordQuestion()
public void setPasswordQuestion(String question)
question
- the password questionpublic void setPasswordAnswer(String answer)
answer
- the password question's answerpublic boolean isValidAnswer(String answer)
answer
- the answer to verify
true
if the answer is valid; false
otherwise.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |