Interface ConversationService

All Known Implementing Classes:
DefaultConversationService

public interface ConversationService
Service to provide related methods for
  • Method Details

    • createConversation

      Optional<ConversationModel> createConversation(String messages)
      Create a ConversationModel
      Parameters:
      messages - the Messages to be saved
      Returns:
      the created conversation
    • getConversationForUid

      Optional<ConversationModel> getConversationForUid(String uid)
      Gets conversation for given uid
      Parameters:
      uid - the conversation uid
      Returns:
      the created conversation
    • getAllConversationsForCustomer

      List<ConversationModel> getAllConversationsForCustomer(CustomerModel customer)
      Gets all conversations of specific customer
      Parameters:
      customer - the specific customer
      Returns:
      the list of ConversationModel
    • getOpenConversationsForAgent

      List<ConversationModel> getOpenConversationsForAgent(EmployeeModel agent)
      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

      Optional<ConversationModel> pickConversation(String uid, EmployeeModel agent)
      Agent chooses a conversation
      Parameters:
      uid - the specific conversation uid
      agent - the agent
      Returns:
      the optional of picked conversation
    • closeConversation

      Optional<ConversationModel> closeConversation(String uid, UserModel user)
      Customer closes a given conversation
      Parameters:
      uid - the specific conversation uid
      user - the user
      Returns:
      the optional of closed conversation
    • updateConversation

      Optional<ConversationModel> updateConversation(String uid, String messages)
      Create Or Update a ConversationModel
      Parameters:
      uid - the specific conversation uid
      messages - the messages to be updated
      Returns:
      the created conversation