public interface UserService
Modifier and Type | Method and Description |
---|---|
InvocationFuture<java.util.List<NimUserInfo>> |
fetchUserInfo(java.util.List<java.lang.String> accounts)
Get user profiles from the app server, 150 user profiles can be fetched per call.
|
java.util.List<NimUserInfo> |
getAllUserInfo()
Get all user profiles from the local database.
|
NimUserInfo |
getUserInfo(java.lang.String account)
Get a user profile from the local database (sync)
|
java.util.List<NimUserInfo> |
getUserInfoList(java.util.List<java.lang.String> accounts)
Get multiple user profiles from the local database (sync)
|
InvocationFuture<java.util.List<java.lang.String>> |
searchAccountByName(java.lang.String name)
Search accounts using nicknames
|
InvocationFuture<java.util.List<NimUserInfo>> |
searchUserInfosByKeyword(java.lang.String keyword)
Search all users with matched keywords.
|
InvocationFuture<java.lang.Void> |
setUserState(int state) |
InvocationFuture<java.lang.Void> |
updateUserInfo(java.util.Map<UserInfoFieldEnum,java.lang.Object> fields)
Update the user profile of the current user.
|
InvocationFuture<java.lang.Void> |
updateUserInfo(java.util.Map<UserInfoFieldEnum,java.lang.Object> fields,
AntiSpamConfig antispamConfig)
Update the user profile of the current user.
|
InvocationFuture<java.util.List<NimUserInfo>> fetchUserInfo(java.util.List<java.lang.String> accounts)
accounts
- accounts whose the user profiles are fetched.java.util.List<NimUserInfo> getUserInfoList(java.util.List<java.lang.String> accounts)
accounts
- accounts whose the user profiles are fetched.NimUserInfo getUserInfo(java.lang.String account)
account
- account whose the user profile is fetched.java.util.List<NimUserInfo> getAllUserInfo()
InvocationFuture<java.lang.Void> updateUserInfo(java.util.Map<UserInfoFieldEnum,java.lang.Object> fields)
fields
- The fields to be updated with new values. Key is the field and value is the updated value.InvocationFuture<java.lang.Void> updateUserInfo(java.util.Map<UserInfoFieldEnum,java.lang.Object> fields, AntiSpamConfig antispamConfig)
fields
- The fields to be updated with new values. Key is the field and value is the updated value.antispamConfig
- Anti-spam configurationInvocationFuture<java.lang.Void> setUserState(int state)
InvocationFuture<java.util.List<NimUserInfo>> searchUserInfosByKeyword(java.lang.String keyword)
InvocationFuture<java.util.List<java.lang.String>> searchAccountByName(java.lang.String name)
name
- Nickname