Interface ConversationParticipantBuilder
- All Known Implementing Classes:
ConversationParticipantBuilderImpl
public interface ConversationParticipantBuilder
This builder supports various ways to add or drop participants within a conversation with smart options like letting them see previous messages or even
all past messages and similar options.
When using one of the joining methods, a special builder is returned to choose one of the joining time options which then returns this builder again for
further method chaining.
Example:
builder.joinParticipant("someUserId").fromBeginning().dropParticipant("someOtherUserId").save();
- Author:
- Micha Kiener
-
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.
-
Method Details
-
joinParticipant
Joins a single participant.- 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
Joins one or more participants.- 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
Joins a collection of participants.- 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
Drops the given participant from the conversation.- Parameters:
userId
- the user to be dropped from the conversation- Returns:
- this builder for further participant management
-
dropParticipants
Drops the given participants from the conversation.- Parameters:
userIds
- the users to be dropped from the conversation- Returns:
- this builder for further participant management
-
dropParticipants
Drops the given participants from the conversation.- Parameters:
userIds
- the users to be dropped from the conversation- Returns:
- this builder for further participant management
-
save
void save()Executes all collected join and drop commands and saves them.
-