Package vaultWeb.services
Class PrivateChatService
java.lang.Object
vaultWeb.services.PrivateChatService
Service class for handling private chats between two users.
Provides functionality to retrieve an existing private chat or create a new one if it does not exist.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOrCreatePrivateChat(String username1, String username2) Retrieves an existing private chat between two users or creates a new one if none exists.
-
Constructor Details
-
PrivateChatService
public PrivateChatService()
-
-
Method Details
-
getOrCreatePrivateChat
Retrieves an existing private chat between two users or creates a new one if none exists.- Parameters:
username1- The username of the first user.username2- The username of the second user.- Returns:
- The existing or newly created PrivateChat entity.
- Throws:
UserNotFoundException- if either user does not exist.
-