public interface TeamService
TeamServiceObserver
Modifier and Type | Method and Description |
---|---|
InvocationFuture<java.lang.Void> |
acceptInvite(java.lang.String teamId,
java.lang.String inviter)
Join a group by accepting an invitation
|
InvocationFuture<java.util.List<TeamMember>> |
addManagers(java.lang.String teamId,
java.util.List<java.lang.String> accounts)
The group owner assign administrators
Only the group owner has the permissions |
InvocationFuture<java.util.List<java.lang.String>> |
addMembers(java.lang.String teamId,
java.util.List<java.lang.String> accounts)
Add a group member
|
InvocationFuture<java.util.List<java.lang.String>> |
addMembersEx(java.lang.String teamId,
java.util.List<java.lang.String> accounts,
java.lang.String msg,
java.lang.String customInfo)
Add a group member
|
InvocationFuture<Team> |
applyJoinTeam(java.lang.String tid,
java.lang.String postscript)
Request joining a group
|
InvocationFuture<CreateTeamResult> |
createTeam(java.util.Map<TeamFieldEnum,java.io.Serializable> fields,
TeamTypeEnum type,
java.lang.String postscript,
java.util.List<java.lang.String> members)
Create a group
|
InvocationFuture<CreateTeamResult> |
createTeam(java.util.Map<TeamFieldEnum,java.io.Serializable> fields,
TeamTypeEnum type,
java.lang.String postscript,
java.util.List<java.lang.String> members,
AntiSpamConfig antiSpamConfig)
Create a group
|
InvocationFuture<java.lang.Void> |
declineInvite(java.lang.String teamId,
java.lang.String inviter,
java.lang.String reason)
Decline an invite request
|
InvocationFuture<java.lang.Void> |
dismissTeam(java.lang.String teamId)
Dismiss a group.
|
InvocationFuture<TeamMsgAckInfo> |
fetchTeamMessageReceiptDetail(IMMessage message)
(Message sender) queries the list of accounts that have read or unread a group message.
|
InvocationFuture<TeamMsgAckInfo> |
fetchTeamMessageReceiptDetail(IMMessage message,
java.util.Set<java.lang.String> accountSet)
(Message sender) queries a list of specified accounts that have read or unread a message.
|
InvocationFuture<java.util.Map<java.lang.String,java.lang.String>> |
getMemberInvitor(java.lang.String tid,
java.util.List<java.lang.String> accids)
Get the inviter.
|
InvocationFuture<java.lang.Void> |
muteAllTeamMember(java.lang.String teamId,
boolean mute)
Mute or unmute a group.
|
InvocationFuture<java.lang.Void> |
muteTeam(java.lang.String teamId,
TeamMessageNotifyTypeEnum notifyType)
Set message type of a specified group.
|
InvocationFuture<java.lang.Void> |
muteTeamMember(java.lang.String teamId,
java.lang.String account,
boolean mute)
Mute and unmute
|
InvocationFuture<java.lang.Void> |
passApply(java.lang.String teamId,
java.lang.String account)
Accept join requests
Only administrators have the permissions |
InvocationFuture<java.util.List<TeamMember>> |
queryMemberList(java.lang.String teamId)
Get a list of specified group members
This operation may only read cached data from the local database or synchronize new data from the server. |
java.util.List<TeamMember> |
queryMutedTeamMembers(java.lang.String teamId)
Query the list of muted group members
The operation returns members muted by calling
muteTeamMember(String, String, boolean) . |
InvocationFuture<Team> |
queryTeam(java.lang.String teamId)
Query the group profile.
|
Team |
queryTeamBlock(java.lang.String teamId)
Query the group profile on local storage, not from the server
If the current user does not belong to the group, the interface returns expired data.
|
int |
queryTeamCountBlock()
Get the number of groups the current user has joined.
|
int |
queryTeamCountByTypeBlock(TeamTypeEnum type)
Get the number of specified type groups the current user has joined
|
InvocationFuture<java.util.List<Team>> |
queryTeamList()
Get the list of groups the current user has joined
|
java.util.List<Team> |
queryTeamListBlock()
Get the list of groups the current user has joined (sync)
|
InvocationFuture<java.util.List<Team>> |
queryTeamListById(java.util.List<java.lang.String> tidList)
Query groups based groups IDs
|
java.util.List<Team> |
queryTeamListByIdBlock(java.util.List<java.lang.String> tidList)
Query groups based groups IDs (sync)
|
InvocationFuture<java.util.List<Team>> |
queryTeamListByType(TeamTypeEnum type)
Get the list of groups of specified types (discussion group, advanced group)
|
java.util.List<Team> |
queryTeamListByTypeBlock(TeamTypeEnum type)
Get the list of groups of specified types (discussion group, advanced group) (sync)
|
InvocationFuture<TeamMember> |
queryTeamMember(java.lang.String teamId,
java.lang.String account)
Get the profile of a group member.
|
TeamMember |
queryTeamMemberBlock(java.lang.String teamId,
java.lang.String account)
Get the profile of a group member.
|
TeamMsgAckInfo |
queryTeamMessageReceiptDetailBlock(IMMessage message)
Get the accounts that have read or unread a group message from the local database (sync)
Note: * The obtained data is earlier than the data before logging off.
|
TeamMsgAckInfo |
queryTeamMessageReceiptDetailBlock(IMMessage message,
java.util.Set<java.lang.String> accountSet)
Get the accounts that have read or unread a group message from the local database (sync)
Note: * The obtained data is earlier than the data before logging off.
|
InvocationFuture<java.lang.Void> |
quitTeam(java.lang.String teamId)
Leave a group
|
void |
refreshTeamMessageReceipt(java.util.List<IMMessage> messages)
(Message sender) updates message read receipt without an asyc callback.
|
InvocationFuture<java.lang.Void> |
rejectApply(java.lang.String teamId,
java.lang.String account,
java.lang.String reason)
Reject join requests
Only administrators have the permissions |
InvocationFuture<java.util.List<TeamMember>> |
removeManagers(java.lang.String teamId,
java.util.List<java.lang.String> managers)
The group owner revokes the administrator privilege
Only the group owner has the permissions |
InvocationFuture<java.lang.Void> |
removeMember(java.lang.String teamId,
java.lang.String member)
Remove a group member.
|
InvocationFuture<java.lang.Void> |
removeMembers(java.lang.String teamId,
java.util.List<java.lang.String> members)
Remove multiple group members.
|
InvocationFuture<TeamInfoResult> |
searchTeam(java.util.List<java.lang.Long> teamIdList)
Query group profiles from servers
|
InvocationFuture<Team> |
searchTeam(java.lang.String teamId)
Query group profiles from servers
|
InvocationFuture<java.util.List<java.lang.String>> |
searchTeamIdByName(java.lang.String name)
Search group IDs using a group name
|
InvocationFuture<java.util.List<IMMessage>> |
searchTeamMsgByKeyword(long tid,
long fromTime,
long endTime,
java.lang.String keyword,
int limit,
boolean reverse)
Search group history messages stored on the cloud using keywords
|
InvocationFuture<java.util.List<Team>> |
searchTeamsByKeyword(java.lang.String keyword)
Search all groups using keywords.
|
InvocationFuture<java.lang.Void> |
sendTeamMessageReceipt(IMMessage message)
(Group recipient) marks group message read
|
InvocationFuture<java.util.List<TeamMember>> |
transferTeam(java.lang.String tid,
java.lang.String account,
boolean quit)
The group owner transfer the ownership of a group to a member.
|
InvocationFuture<java.lang.Void> |
updateMemberNick(java.lang.String teamId,
java.lang.String account,
java.lang.String nick)
Group administrators edit the nickname of a member
Only administrators have the permissions |
InvocationFuture<java.lang.Void> |
updateMyMemberExtension(java.lang.String teamId,
java.util.Map<java.lang.String,java.lang.Object> extension)
Edit the extension field in the group profile of the current user (user defined attribute)
|
InvocationFuture<java.lang.Void> |
updateMyTeamNick(java.lang.String teamId,
java.lang.String nick)
Edit the nickname of the current user
|
InvocationFuture<java.lang.Void> |
updateName(java.lang.String teamId,
java.lang.String name)
Deprecated.
use
updateTeam(String, TeamFieldEnum, Serializable) instead |
InvocationFuture<java.lang.Void> |
updateTeam(java.lang.String teamId,
TeamFieldEnum field,
java.io.Serializable value)
Update the group profile
|
InvocationFuture<java.lang.Void> |
updateTeamFields(java.lang.String teamId,
java.util.Map<TeamFieldEnum,java.io.Serializable> fields)
Update multiple fields of the group profile.
|
InvocationFuture<java.lang.Void> |
updateTeamFields(java.lang.String teamId,
java.util.Map<TeamFieldEnum,java.io.Serializable> fields,
AntiSpamConfig antiSpamConfig)
Update multiple fields of the group profile.
|
InvocationFuture<CreateTeamResult> createTeam(java.util.Map<TeamFieldEnum,java.io.Serializable> fields, TeamTypeEnum type, java.lang.String postscript, java.util.List<java.lang.String> members)
fields
- group default data, key is the data field, and value is the corresponding value. The value type must be the same as the fieldType defined in the field.type
- type of the group to be createdpostscript
- additional message. The parameter is invalid if the group is temporary.members
- list of members to be invited.InvocationFuture<CreateTeamResult> createTeam(java.util.Map<TeamFieldEnum,java.io.Serializable> fields, TeamTypeEnum type, java.lang.String postscript, java.util.List<java.lang.String> members, AntiSpamConfig antiSpamConfig)
fields
- group default data, key is the data field, and value is the corresponding value. The value type must be the same as the fieldType defined in the field.type
- type of the group to be createdpostscript
- additional message. The parameter is invalid if the group is temporary.members
- list of members to be invited.antiSpamConfig
- Anti-spam configurationInvocationFuture<java.util.List<java.lang.String>> addMembers(java.lang.String teamId, java.util.List<java.lang.String> accounts)
teamId
- group IDaccounts
- The list of accounts to join a groupInvocationFuture<java.util.List<java.lang.String>> addMembersEx(java.lang.String teamId, java.util.List<java.lang.String> accounts, java.lang.String msg, java.lang.String customInfo)
teamId
- group IDaccounts
- The list of accounts to join a groupmsg
- additional message for invitation. Ignore it if not required.customInfo
- custom extension. Ignore the extension if not required. The field can contain up to 512 characters.InvocationFuture<java.lang.Void> removeMember(java.lang.String teamId, java.lang.String member)
teamId
- group IDmember
- account of a member to be removedInvocationFuture<java.lang.Void> removeMembers(java.lang.String teamId, java.util.List<java.lang.String> members)
teamId
- group IDmembers
- list of accounts to be removedInvocationFuture<java.lang.Void> updateName(java.lang.String teamId, java.lang.String name)
updateTeam(String, TeamFieldEnum, Serializable)
insteadteamId
- group IDname
- new name of a groupInvocationFuture<java.lang.Void> updateTeam(java.lang.String teamId, TeamFieldEnum field, java.io.Serializable value)
teamId
- group IDfield
- field to be updatgedvalue
- new value of a field
The value data type must be consistent with the defined fieldType.InvocationFuture<java.lang.Void> updateTeamFields(java.lang.String teamId, java.util.Map<TeamFieldEnum,java.io.Serializable> fields)
teamId
- group IDfields
- new values of fields to be updated. The value data type must be consistent with the defined fieldType.InvocationFuture<java.lang.Void> updateTeamFields(java.lang.String teamId, java.util.Map<TeamFieldEnum,java.io.Serializable> fields, AntiSpamConfig antiSpamConfig)
teamId
- group IDfields
- new values of fields to be updated. The value data type must be consistent with the defined fieldType.antiSpamConfig
- Anti-spam configurationInvocationFuture<java.lang.Void> dismissTeam(java.lang.String teamId)
teamId
- group IDInvocationFuture<java.lang.Void> quitTeam(java.lang.String teamId)
teamId
- group IDInvocationFuture<Team> queryTeam(java.lang.String teamId)
searchTeam(String)
.teamId
- group IDTeam queryTeamBlock(java.lang.String teamId)
searchTeam(String)
.teamId
- group IDInvocationFuture<java.util.List<Team>> queryTeamList()
java.util.List<Team> queryTeamListBlock()
InvocationFuture<java.util.List<Team>> queryTeamListById(java.util.List<java.lang.String> tidList)
tidList
- List of group IDsjava.util.List<Team> queryTeamListByIdBlock(java.util.List<java.lang.String> tidList)
tidList
- List of group IDsInvocationFuture<java.util.List<Team>> queryTeamListByType(TeamTypeEnum type)
type
- group typejava.util.List<Team> queryTeamListByTypeBlock(TeamTypeEnum type)
type
- group typeint queryTeamCountBlock()
int queryTeamCountByTypeBlock(TeamTypeEnum type)
type
- group typeInvocationFuture<Team> searchTeam(java.lang.String teamId)
teamId
- list of group IDsInvocationFuture<TeamInfoResult> searchTeam(java.util.List<java.lang.Long> teamIdList)
teamIdList
- list of group IDs. If more than 10 IDs are returned, take the first 10 IDs.InvocationFuture<Team> applyJoinTeam(java.lang.String tid, java.lang.String postscript)
tid
- the ID of a group to be joinedpostscript
- additional messageInvocationFuture<java.lang.Void> passApply(java.lang.String teamId, java.lang.String account)
teamId
- group IDaccount
- ID of accounts that sent the join requestInvocationFuture<java.lang.Void> rejectApply(java.lang.String teamId, java.lang.String account, java.lang.String reason)
teamId
- group IDaccount
- ID of accounts that sent the join requestreason
- reasons for rejection. OptionalInvocationFuture<java.util.List<TeamMember>> addManagers(java.lang.String teamId, java.util.List<java.lang.String> accounts)
teamId
- group IDaccounts
- list of members to be assigned the administrator privilegeInvocationFuture<java.util.List<TeamMember>> removeManagers(java.lang.String teamId, java.util.List<java.lang.String> managers)
teamId
- group IDmanagers
- list of administrators to be revoked the administrator privilege.InvocationFuture<java.util.List<TeamMember>> transferTeam(java.lang.String tid, java.lang.String account, boolean quit)
tid
- group IDaccount
- account of the new group ownerquit
- specify whether to leave the group after the transferInvocationFuture<java.lang.Void> acceptInvite(java.lang.String teamId, java.lang.String inviter)
teamId
- group IDinviter
- account of an inviterInvocationFuture<java.lang.Void> declineInvite(java.lang.String teamId, java.lang.String inviter, java.lang.String reason)
teamId
- group IDinviter
- account of an inviterreason
- reasons for rejection. OptionalInvocationFuture<java.util.List<TeamMember>> queryMemberList(java.lang.String teamId)
teamId
- group IDInvocationFuture<TeamMember> queryTeamMember(java.lang.String teamId, java.lang.String account)
teamId
- group IDaccount
- account of a group memberTeamMember queryTeamMemberBlock(java.lang.String teamId, java.lang.String account)
teamId
- group IDaccount
- account of a group memberjava.util.List<TeamMember> queryMutedTeamMembers(java.lang.String teamId)
muteTeamMember(String, String, boolean)
.teamId
- group IDInvocationFuture<java.lang.Void> updateMyTeamNick(java.lang.String teamId, java.lang.String nick)
teamId
- group IDnick
- new nicknameInvocationFuture<java.lang.Void> updateMemberNick(java.lang.String teamId, java.lang.String account, java.lang.String nick)
teamId
- group IDaccount
- account of a member whose nickname is editednick
- new nicknameInvocationFuture<java.lang.Void> updateMyMemberExtension(java.lang.String teamId, java.util.Map<java.lang.String,java.lang.Object> extension)
teamId
- group IDextension
- extension field (user defined)InvocationFuture<java.lang.Void> muteTeam(java.lang.String teamId, TeamMessageNotifyTypeEnum notifyType)
TeamMessageNotifyTypeEnum
teamId
- group IDnotifyType
- notification type enumerationInvocationFuture<java.lang.Void> muteTeamMember(java.lang.String teamId, java.lang.String account, boolean mute)
teamId
- group IDaccount
- muted or ummuted accountmute
- true: mute; false: unmuteInvocationFuture<java.lang.Void> muteAllTeamMember(java.lang.String teamId, boolean mute)
teamId
- group IDmute
- true: mute; false: unmuteInvocationFuture<java.lang.Void> sendTeamMessageReceipt(IMMessage message)
message
- group messagevoid refreshTeamMessageReceipt(java.util.List<IMMessage> messages)
MsgServiceObserve.observeTeamMessageReceipt(Observer, boolean)
callback. No notification will be sent if no changes occur.messages
- messages to be updated for read receiptInvocationFuture<TeamMsgAckInfo> fetchTeamMessageReceiptDetail(IMMessage message)
message
- message to be queriedInvocationFuture<TeamMsgAckInfo> fetchTeamMessageReceiptDetail(IMMessage message, java.util.Set<java.lang.String> accountSet)
message
- message to be queriedaccountSet
- Set
that contains accounts of specified users.
If unspecified, an empty list will be returned.TeamMsgAckInfo queryTeamMessageReceiptDetailBlock(IMMessage message)
message
- message to be queriedTeamMsgAckInfo queryTeamMessageReceiptDetailBlock(IMMessage message, java.util.Set<java.lang.String> accountSet)
message
- message to be queriedaccountSet
- Set
that contains accounts of specified users.
If unspecified, an empty list will be returned.InvocationFuture<java.util.Map<java.lang.String,java.lang.String>> getMemberInvitor(java.lang.String tid, java.util.List<java.lang.String> accids)
tid
- group IDaccids
- user accid. A maximum of 200 accids are allowed.InvocationFuture<java.util.List<Team>> searchTeamsByKeyword(java.lang.String keyword)
InvocationFuture<java.util.List<IMMessage>> searchTeamMsgByKeyword(long tid, long fromTime, long endTime, java.lang.String keyword, int limit, boolean reverse)
tid
- group IDfromTime
- The start time in millisecondsendTime
- The end time in millisecondskeyword
- keywordlimit
- The limit of messages returned from a query. A maximum of 100 messages are returned.reverse
- Optional. If the parameter is not specified, false is applied by default. A value of true implements a reverse search that starts from the earliest to date and display the result in descending order. The default value is false, which indicates that the search starts from the current date to the earliest time and displays the result in ascending orderInvocationFuture<java.util.List<java.lang.String>> searchTeamIdByName(java.lang.String name)
name
- group name