Interface GroupConversationService
- All Known Implementing Classes:
GroupConversationServiceImpl
public interface GroupConversationService
Service contract for managing group conversations.
Each method is documented to improve generated JavaDoc and maintainability.
-
Method Summary
Modifier and TypeMethodDescriptioncreateGroupConversation(String name, String description, UUID createdBy) Create a new group conversation.booleanhasAdminPrivileges(UUID conversationId, UUID userId) Check if a user has admin privileges in the conversation.voidinviteUserToGroup(UUID conversationId, UUID userId, UUID invitedBy) Invite a user to a group conversation.booleanisUserParticipant(UUID conversationId, UUID userId) Check if a user is a participant in the conversation.voidpromoteUserToAdmin(UUID conversationId, UUID userId, UUID promotedBy) Promote a user to admin in a group conversation.booleanremoveUserFromGroup(UUID conversationId, UUID userId, UUID removedBy) Remove a user from a group conversation.
-
Method Details
-
createGroupConversation
Create a new group conversation.- Parameters:
name- group namedescription- group description (optional)createdBy- creator user ID- Returns:
- the created Conversation entity
-
inviteUserToGroup
Invite a user to a group conversation.- Parameters:
conversationId- the conversation IDuserId- user to be invitedinvitedBy- inviter user ID
-
removeUserFromGroup
Remove a user from a group conversation.- Parameters:
conversationId- the conversation IDuserId- user to removeremovedBy- actor performing the removal- Returns:
- true if removal succeeded
-
promoteUserToAdmin
Promote a user to admin in a group conversation.- Parameters:
conversationId- the conversation IDuserId- user to promotepromotedBy- actor performing the promotion
-
isUserParticipant
Check if a user is a participant in the conversation.- Parameters:
conversationId- the conversation IDuserId- the user ID- Returns:
- true if the user is an active participant
-
hasAdminPrivileges
Check if a user has admin privileges in the conversation.- Parameters:
conversationId- the conversation IDuserId- the user ID- Returns:
- true if the user is admin
-