Interface MessageService

All Known Implementing Classes:
MessageServiceImpl

public interface MessageService
Author:
Filip Hrisafov
  • Method Details

    • createMessageBuilder

      MessageBuilder createMessageBuilder()
    • createMessageQuery

      MessageQuery createMessageQuery()
    • findById

      Message findById(String messageId)
    • findByIdWithMessageAudits

      Message findByIdWithMessageAudits(String messageId)
    • markMessageAsRead

      void markMessageAsRead(String messageId, String userId)
    • updateMessageActionInstanceId

      void updateMessageActionInstanceId(String actionInstanceId, String messageId, String userId)
    • deleteMessage

      void deleteMessage(String messageId, String userId)
    • referenceMessage

      void referenceMessage(String messageId, String referenceId, String referenceType)
      Reference the message with the given messageId with the referenceId and referenceType. It is not possible to reference an already referenced message.
      Parameters:
      messageId - the id of the message that needs to be referenced
      referenceId - the id of the reference
      referenceType - the type of the reference
    • updateMessageContent

      Message updateMessageContent(String messageId, String mainContent)
    • updateMessageMedia

      Message updateMessageMedia(String messageId, ContentItem contentItem, InputStream contentStream)
      Change the media content of the media message with the given content item and input stream.
      Parameters:
      messageId - the id of the media message being updated
      contentItem - the new content item for the media
      contentStream - the new input stream for the media
      Returns:
      the updated message
    • updateMessageMedia

      Message updateMessageMedia(String messageId, String mediaContentId)
      Change the media content id of the media message with the given mediaContentId.
      Parameters:
      messageId - the id of the media message being updated
      mediaContentId - the new id of the media content
      Returns:
      the updated message
    • createReactionQuery

      ReactionQuery createReactionQuery()
    • reactToMessage

      String reactToMessage(String messageId, String userId, String reaction)
    • removeReactionToMessage

      void removeReactionToMessage(String reactionId)