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 EngageEngineConfiguration
protected final String
protected 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.void
save()
Executes all collected join and drop commands and saves them.protected void
Internal 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:ConversationParticipantBuilder
Joins a single participant.- Specified by:
joinParticipant
in 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:ConversationParticipantBuilder
Joins one or more participants.- Specified by:
joinParticipants
in 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:ConversationParticipantBuilder
Joins a collection of participants.- Specified by:
joinParticipants
in 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:ConversationParticipantBuilder
Drops the given participant from the conversation.- Specified by:
dropParticipant
in interfaceConversationParticipantBuilder
- Parameters:
userId
- the user to be dropped from the conversation- Returns:
- this builder for further participant management
-
dropParticipants
Description copied from interface:ConversationParticipantBuilder
Drops the given participants from the conversation.- Specified by:
dropParticipants
in interfaceConversationParticipantBuilder
- Parameters:
userIds
- the users to be dropped from the conversation- Returns:
- this builder for further participant management
-
dropParticipants
Description copied from interface:ConversationParticipantBuilder
Drops the given participants from the conversation.- Specified by:
dropParticipants
in 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:ConversationParticipantBuilder
Executes all collected join and drop commands and saves them.- Specified by:
save
in interfaceConversationParticipantBuilder
-
getConversationId
-
getParticipantsToJoin
-
getParticipantsToDrop
-