Interface ConversationService
- All Known Implementing Classes:
DefaultConversationService
public interface ConversationService
Service to provide related methods for
-
Method Summary
Modifier and TypeMethodDescriptioncloseConversation(String uid, UserModel user) Customer closes a given conversationcreateConversation(String messages) Create a ConversationModelgetAllConversationsForCustomer(CustomerModel customer) Gets all conversations of specific customerGets conversation for given uidGets open conversations for agentGets Unassigned conversations of agentpickConversation(String uid, EmployeeModel agent) Agent chooses a conversationupdateConversation(String uid, String messages) Create Or Update a ConversationModel
-
Method Details
-
createConversation
Create a ConversationModel- Parameters:
messages- the Messages to be saved- Returns:
- the created conversation
-
getConversationForUid
Gets conversation for given uid- Parameters:
uid- the conversation uid- Returns:
- the created conversation
-
getAllConversationsForCustomer
Gets all conversations of specific customer- Parameters:
customer- the specific customer- Returns:
- the list of ConversationModel
-
getOpenConversationsForAgent
Gets open conversations for agent- Parameters:
agent- the specific agent- Returns:
- the list of ConversationModel
-
getUnassignedConversations
List<ConversationModel> getUnassignedConversations()Gets Unassigned conversations of agent- Returns:
- the list of ConversationModel
-
pickConversation
Agent chooses a conversation- Parameters:
uid- the specific conversation uidagent- the agent- Returns:
- the optional of picked conversation
-
closeConversation
Customer closes a given conversation- Parameters:
uid- the specific conversation uiduser- the user- Returns:
- the optional of closed conversation
-
updateConversation
Create Or Update a ConversationModel- Parameters:
uid- the specific conversation uidmessages- the messages to be updated- Returns:
- the created conversation
-