|
Openfire 3.6.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.user.User
public class User
Encapsulates information about a user. New users are created using
UserManager.createUser(String, String, String, String)
. All user
properties are loaded on demand and are read from the ofUserProp
database table. The currently-installed UserProvider
is used for
setting all other user data and some operations may not be supported
depending on the capabilities of the UserProvider
.
Constructor Summary | |
---|---|
User()
Constructor added for Externalizable. |
|
User(String username,
String name,
String email,
Date creationDate,
Date modificationDate)
Constructs a new user. |
Method Summary | |
---|---|
boolean |
equals(Object object)
|
int |
getCachedSize()
Returns the approximate size of the Object in bytes. |
Date |
getCreationDate()
|
String |
getEmail()
Returns the email address of the user or null if none is defined. |
Date |
getModificationDate()
|
String |
getName()
|
Map<String,String> |
getProperties()
Returns all extended properties of the user. |
static String |
getPropertyValue(String username,
String propertyName)
Returns the value of the specified property for the given username. |
Roster |
getRoster()
Returns the user's roster. |
String |
getUID()
Returns a unique identifier for this Result. |
String |
getUsername()
Returns this user's username. |
int |
hashCode()
|
boolean |
isEmailVisible()
Returns true if email is visible to everyone or not. |
boolean |
isNameVisible()
Returns true if name is visible to everyone or not. |
void |
readExternal(ObjectInput in)
|
void |
setCreationDate(Date creationDate)
|
void |
setEmail(String email)
|
void |
setEmailVisible(boolean visible)
Sets if the email is visible to everyone or not. |
void |
setModificationDate(Date modificationDate)
|
void |
setName(String name)
|
void |
setNameVisible(boolean visible)
Sets if name is visible to everyone or not. |
void |
setPassword(String password)
Sets a new password for this user. |
String |
toString()
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public User()
public User(String username, String name, String email, Date creationDate, Date modificationDate)
UserManager.getUser(String)
.
username
- the username.name
- the name.email
- the email address.creationDate
- the date the user was created.modificationDate
- the date the user was last modified.Method Detail |
---|
public static String getPropertyValue(String username, String propertyName)
username
- the username of the user to get a specific property value.propertyName
- the name of the property to return its value.
public String getUsername()
public void setPassword(String password) throws UnsupportedOperationException
password
- the new password for the user.
UnsupportedOperationException
- exceptionpublic String getName()
public void setName(String name)
public boolean isNameVisible()
public void setNameVisible(boolean visible)
visible
- true if name is visible, false if not.public String getEmail()
public void setEmail(String email)
public boolean isEmailVisible()
public void setEmailVisible(boolean visible)
visible
- true if the email is visible, false if not.public Date getCreationDate()
public void setCreationDate(Date creationDate)
public Date getModificationDate()
public void setModificationDate(Date modificationDate)
public Map<String,String> getProperties()
public Roster getRoster()
public int getCachedSize()
Cacheable
getCachedSize
in interface Cacheable
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object object)
equals
in class Object
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public String getUID()
Result
(...) the UIDs are unique in the context of all possible members of the full result set. Each UID MAY be based on part of the content of its associated item (...) or on an internal table index. Another possible method is to serialize the XML of the item and then hash it to generate the UID. Note: The requesting entity MUST treat all UIDs as opaque.
getUID
in interface Result
|
Openfire 3.6.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |