public class UserInfo extends Object
| Constructor and Description |
|---|
UserInfo(String userId)
Creates a new user info object from the given user id.
|
UserInfo(String userId,
String name)
Creates a new user info object from the given user id and name.
|
UserInfo(String userId,
String name,
String imageUrl)
Creates a new user info object from the given user id, name and image
URL.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAbbreviation()
Gets the user's abbreviation.
|
int |
getColorIndex()
Gets the user's color index.
|
String |
getId()
Gets the user's unique identifier.
|
String |
getImage()
Gets the url of the user's image.
|
String |
getName()
Gets the user's name.
|
int |
hashCode() |
void |
setAbbreviation(String abbreviation)
Sets the user's abbreviation.
|
void |
setColorIndex(int colorIndex)
Sets the user's color index.
|
void |
setImage(String imageUrl)
Sets the url of the user's image.
|
void |
setName(String name)
Sets the user's name.
|
public UserInfo(String userId)
userId - the user id, not nullpublic UserInfo(String userId, String name)
userId - the user id, not nullname - the name of the userpublic UserInfo(String userId, String name, String imageUrl)
If this user info is given to a CollaborationAvatarGroup, the
image URL is used to load the user's avatar. Alternatively, the user
images can be loaded from a backend to the avatar group with
CollaborationAvatarGroup.setImageProvider(ImageProvider).
userId - the user id, not nullname - the name of the userimageUrl - the URL of the user imagepublic String getId()
nullpublic String getName()
public void setName(String name)
name - the name to setpublic String getAbbreviation()
Note: This is not computed based on the user's name, but needs to be
explicitly set with setAbbreviation(String).
public void setAbbreviation(String abbreviation)
abbreviation - the abbreviation to setpublic String getImage()
public void setImage(String imageUrl)
If this user info is given to a CollaborationAvatarGroup, the
image URL is used to load the user's avatar. Alternatively, the user
images can be loaded from a backend to the avatar group with
CollaborationAvatarGroup.setImageProvider(ImageProvider).
imageUrl - the image URL to setpublic int getColorIndex()
The color index defines the user specific color. In practice, color index
n means that the user color will be set as the CSS variable
--vaadin-user-color-n.
The default value is -1, which indicates that the user color can be automatically assigned by Collaboration Engine.
public void setColorIndex(int colorIndex)
Setting it to -1 (which is the default value) indicates that the user color can be automatically assigned by Collaboration Engine.
colorIndex - the color index to setgetColorIndex()Copyright © 2021. All rights reserved.