Class ConversationParticipantBuilderImpl
java.lang.Object
com.flowable.engage.engine.impl.conversation.ConversationParticipantBuilderImpl
- All Implemented Interfaces:
ConversationParticipantBuilder
public class ConversationParticipantBuilderImpl
extends Object
implements ConversationParticipantBuilder
Default implementation for the participant builder API.
- Author:
- Micha Kiener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final EngageEngineConfigurationprotected final Stringprotected List<JoinParticipantsData> -
Constructor Summary
ConstructorsConstructorDescriptionConversationParticipantBuilderImpl(EngageEngineConfiguration configuration, String conversationId) -
Method Summary
Modifier and TypeMethodDescriptiondropParticipant(String userId) Drops the given participant from the conversation.dropParticipants(String... userIds) Drops the given participants from the conversation.dropParticipants(Collection<String> userIds) Drops the given participants from the conversation.joinParticipant(String userId) Joins a single participant.joinParticipants(String... userIds) Joins one or more participants.joinParticipants(Collection<String> userIds) Joins a collection of participants.voidsave()Executes all collected join and drop commands and saves them.protected voidInternal validation to check whether no participant is added and removed the same time.
-
Field Details
-
configuration
-
conversationId
-
participantsToJoin
-
participantsToDrop
-
-
Constructor Details
-
ConversationParticipantBuilderImpl
public ConversationParticipantBuilderImpl(EngageEngineConfiguration configuration, String conversationId)
-
-
Method Details
-
joinParticipant
Description copied from interface:ConversationParticipantBuilderJoins a single participant.- Specified by:
joinParticipantin interfaceConversationParticipantBuilder- Parameters:
userId- the id of the user to be added as a new participant- Returns:
- the joining builder to set the joining time (e.g. default, now, from beginning, etc)
-
joinParticipants
Description copied from interface:ConversationParticipantBuilderJoins one or more participants.- Specified by:
joinParticipantsin interfaceConversationParticipantBuilder- Parameters:
userIds- the ids of the users to be added as a new participants- Returns:
- the joining builder to set the joining time (e.g. default, now, from beginning, etc) which is then used for all the provided users
-
joinParticipants
Description copied from interface:ConversationParticipantBuilderJoins a collection of participants.- Specified by:
joinParticipantsin interfaceConversationParticipantBuilder- Parameters:
userIds- the ids of the users to be added as a new participants- Returns:
- the joining builder to set the joining time (e.g. default, now, from beginning, etc) which is then used for all the provided users
-
dropParticipant
Description copied from interface:ConversationParticipantBuilderDrops the given participant from the conversation.- Specified by:
dropParticipantin interfaceConversationParticipantBuilder- Parameters:
userId- the user to be dropped from the conversation- Returns:
- this builder for further participant management
-
dropParticipants
Description copied from interface:ConversationParticipantBuilderDrops the given participants from the conversation.- Specified by:
dropParticipantsin interfaceConversationParticipantBuilder- Parameters:
userIds- the users to be dropped from the conversation- Returns:
- this builder for further participant management
-
dropParticipants
Description copied from interface:ConversationParticipantBuilderDrops the given participants from the conversation.- Specified by:
dropParticipantsin interfaceConversationParticipantBuilder- Parameters:
userIds- the users to be dropped from the conversation- Returns:
- this builder for further participant management
-
validateData
protected void validateData()Internal validation to check whether no participant is added and removed the same time. -
save
public void save()Description copied from interface:ConversationParticipantBuilderExecutes all collected join and drop commands and saves them.- Specified by:
savein interfaceConversationParticipantBuilder
-
getConversationId
-
getParticipantsToJoin
-
getParticipantsToDrop
-