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 Detail

      • joinParticipant

        ParticipantJoiningBuilder joinParticipant​(String userId)
        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

        ParticipantJoiningBuilder joinParticipants​(String... userIds)
        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

        ParticipantJoiningBuilder joinParticipants​(Collection<String> userIds)
        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

        ConversationParticipantBuilder dropParticipant​(String userId)
        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

        ConversationParticipantBuilder dropParticipants​(String... userIds)
        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

        ConversationParticipantBuilder dropParticipants​(Collection<String> userIds)
        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.