public class ConversationParticipantBuilderImpl extends Object implements ConversationParticipantBuilder
| Modifier and Type | Field and Description |
|---|---|
protected EngageEngineConfiguration |
configuration |
protected String |
conversationId |
protected List<String> |
participantsToDrop |
protected List<JoinParticipantsData> |
participantsToJoin |
| Constructor and Description |
|---|
ConversationParticipantBuilderImpl(EngageEngineConfiguration configuration,
String conversationId) |
| Modifier and Type | Method and Description |
|---|---|
ConversationParticipantBuilder |
dropParticipant(String userId)
Drops the given participant from the conversation.
|
ConversationParticipantBuilder |
dropParticipants(Collection<String> userIds)
Drops the given participants from the conversation.
|
ConversationParticipantBuilder |
dropParticipants(String... userIds)
Drops the given participants from the conversation.
|
String |
getConversationId() |
List<String> |
getParticipantsToDrop() |
List<JoinParticipantsData> |
getParticipantsToJoin() |
ParticipantJoiningBuilder |
joinParticipant(String userId)
Joins a single participant.
|
ParticipantJoiningBuilder |
joinParticipants(Collection<String> userIds)
Joins a collection of participants.
|
ParticipantJoiningBuilder |
joinParticipants(String... userIds)
Joins one or more participants.
|
void |
save()
Executes all collected join and drop commands and saves them.
|
protected void |
validateData()
Internal validation to check whether no participant is added and removed the same time.
|
protected final EngageEngineConfiguration configuration
protected final String conversationId
protected List<JoinParticipantsData> participantsToJoin
public ConversationParticipantBuilderImpl(EngageEngineConfiguration configuration, String conversationId)
public ParticipantJoiningBuilder joinParticipant(String userId)
ConversationParticipantBuilderjoinParticipant in interface ConversationParticipantBuilderuserId - the id of the user to be added as a new participantpublic ParticipantJoiningBuilder joinParticipants(String... userIds)
ConversationParticipantBuilderjoinParticipants in interface ConversationParticipantBuilderuserIds - the ids of the users to be added as a new participantspublic ParticipantJoiningBuilder joinParticipants(Collection<String> userIds)
ConversationParticipantBuilderjoinParticipants in interface ConversationParticipantBuilderuserIds - the ids of the users to be added as a new participantspublic ConversationParticipantBuilder dropParticipant(String userId)
ConversationParticipantBuilderdropParticipant in interface ConversationParticipantBuilderuserId - the user to be dropped from the conversationpublic ConversationParticipantBuilder dropParticipants(String... userIds)
ConversationParticipantBuilderdropParticipants in interface ConversationParticipantBuilderuserIds - the users to be dropped from the conversationpublic ConversationParticipantBuilder dropParticipants(Collection<String> userIds)
ConversationParticipantBuilderdropParticipants in interface ConversationParticipantBuilderuserIds - the users to be dropped from the conversationprotected void validateData()
public void save()
ConversationParticipantBuildersave in interface ConversationParticipantBuilderpublic String getConversationId()
public List<JoinParticipantsData> getParticipantsToJoin()