public interface UserProfile extends Serializable
AuthenticationManager
;
if a profile is locked, the user cannot log with that profile.Modifier and Type | Method and Description |
---|---|
Map<String,Serializable> |
getAttributes()
Returns the attributes associated with this profile as a Map of key/value pairs.
|
Date |
getCreated()
Returns the creation date.
|
String |
getEmail()
Returns the user's e-mail address.
|
String |
getFullname()
Returns the user's full name.
|
Date |
getLastModified()
Returns the last-modified date.
|
Date |
getLockExpiry()
Returns the date/time of expiration of the profile's lock, if it has been
previously locked via
setLockExpiry(Date) and the lock is
still active. |
String |
getLoginName()
Returns the user's login name.
|
String |
getPassword()
Returns the user password for use with custom authentication.
|
String |
getUid()
Returns the unique identifier for the user profile.
|
String |
getWikiName()
Returns the user's wiki name, based on the full name with all
whitespace removed.
|
boolean |
isLocked()
Returns
true if the profile is currently locked (disabled); false otherwise. |
boolean |
isNew()
Returns
true if the profile has never been
saved before. |
void |
setCreated(Date date)
Sets the created date.
|
void |
setEmail(String email)
Sets the user's e-mail address.
|
void |
setFullname(String arg)
Sets the user's full name.
|
void |
setLastModified(Date date)
Sets the last-modified date
|
void |
setLockExpiry(Date expiry)
Locks the profile until a specified lock expiration date.
|
void |
setLoginName(String name)
Sets the name by which the user logs in.
|
void |
setPassword(String arg)
Sets the user's password for use with custom authentication.
|
void |
setUid(String uid)
Sets the unique identifier for the user profile.
|
String |
toString()
Returns a string representation of this user profile.
|
Map<String,Serializable> getAttributes()
Date getCreated()
String getFullname()
Date getLastModified()
Date getLockExpiry()
setLockExpiry(Date)
and the lock is
still active. If the profile is unlocked, this method returns null
.
Note that calling this method after the expiration date, even if had previously
been set explicitly by setLockExpiry(Date)
, will always return
null.
String getLoginName()
String getPassword()
UserDatabase
implementation, in most cases the
value returned by this method will be a password hash, not the password
itself.String getUid()
null
.String getWikiName()
boolean isLocked()
true
if the profile is currently locked (disabled); false
otherwise.
By default, profiles are created unlocked. Strictly speaking, calling this method is equivalent to calling getLockExpiry()
and, if it returns a non-null
value, checking if the date returned is later than the current time.boolean isNew()
true
if the profile has never been
saved before. Implementing classes might check the
last modified date, for example, to determine this.void setCreated(Date date)
date
- the creation datevoid setEmail(String email)
email
- the e-mail addressvoid setFullname(String arg)
arg
- the full namevoid setLastModified(Date date)
date
- the last-modified datevoid setLockExpiry(Date expiry)
expiry
- the date the lock expires; setting this value to null
will cause the lock to be cleared.void setLoginName(String name)
AuthenticationManager.login(WikiSession,HttpServletRequest, String, String)
,
UserDatabaseLoginModule
). The login
name is typically a short name ("jannej"). In contrast, the wiki name is
typically of type FirstnameLastName ("JanneJalkanen").name
- the login namevoid setPassword(String arg)
UserDatabase.save(UserProfile)
).
Note that the password field is not meaningful for container
authentication; the user's private credentials are generally stored
elsewhere.arg
- the passwordvoid setUid(String uid)
uid
- the unique identifier to setCopyright © 2001-2019 The Apache Software Foundation. All rights reserved.