Interface ConversationService
-
- All Known Implementing Classes:
DefaultConversationService
public interface ConversationServiceService to provide related methods for
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<ConversationModel>closeConversation(java.lang.String uid, UserModel user)Customer closes a given conversationjava.util.Optional<ConversationModel>createConversation(java.lang.String messages)Create a ConversationModeljava.util.List<ConversationModel>getAllConversationsForCustomer(CustomerModel customer)Gets all conversations of specific customerjava.util.Optional<ConversationModel>getConversationForUid(java.lang.String uid)Gets conversation for given uidjava.util.List<ConversationModel>getOpenConversationsForAgent(EmployeeModel agent)Gets open conversations for agentjava.util.List<ConversationModel>getUnassignedConversations()Gets Unassigned conversations of agentjava.util.Optional<ConversationModel>pickConversation(java.lang.String uid, EmployeeModel agent)Agent chooses a conversationjava.util.Optional<ConversationModel>updateConversation(java.lang.String uid, java.lang.String messages)Create Or Update a ConversationModel
-
-
-
Method Detail
-
createConversation
java.util.Optional<ConversationModel> createConversation(java.lang.String messages)
Create a ConversationModel- Parameters:
messages- the Messages to be saved- Returns:
- the created conversation
-
getConversationForUid
java.util.Optional<ConversationModel> getConversationForUid(java.lang.String uid)
Gets conversation for given uid- Parameters:
uid- the conversation uid- Returns:
- the created conversation
-
getAllConversationsForCustomer
java.util.List<ConversationModel> getAllConversationsForCustomer(CustomerModel customer)
Gets all conversations of specific customer- Parameters:
customer- the specific customer- Returns:
- the list of ConversationModel
-
getOpenConversationsForAgent
java.util.List<ConversationModel> getOpenConversationsForAgent(EmployeeModel agent)
Gets open conversations for agent- Parameters:
agent- the specific agent- Returns:
- the list of ConversationModel
-
getUnassignedConversations
java.util.List<ConversationModel> getUnassignedConversations()
Gets Unassigned conversations of agent- Returns:
- the list of ConversationModel
-
pickConversation
java.util.Optional<ConversationModel> pickConversation(java.lang.String uid, EmployeeModel agent)
Agent chooses a conversation- Parameters:
uid- the specific conversation uidagent- the agent- Returns:
- the optional of picked conversation
-
closeConversation
java.util.Optional<ConversationModel> closeConversation(java.lang.String uid, UserModel user)
Customer closes a given conversation- Parameters:
uid- the specific conversation uiduser- the user- Returns:
- the optional of closed conversation
-
updateConversation
java.util.Optional<ConversationModel> updateConversation(java.lang.String uid, java.lang.String messages)
Create Or Update a ConversationModel- Parameters:
uid- the specific conversation uidmessages- the messages to be updated- Returns:
- the created conversation
-
-