Interface ConversationService

  • All Known Implementing Classes:
    DefaultConversationService

    public interface ConversationService
    Service to provide related methods for
    • 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 uid
        agent - 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 uid
        user - 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 uid
        messages - the messages to be updated
        Returns:
        the created conversation