Class MessageService


  • @Service
    public class MessageService
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      MessageService()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Message createMessage​(long chatId, Message message)
      Save a new message in the database, and add it to the chat.
      MessageDTO createMessageDTO​(MessageDTO messageDTO)
      Creates new message based on information from messageDTO and saves it in the database.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MessageService

        public MessageService()
    • Method Detail

      • createMessage

        public Message createMessage​(long chatId,
                                     Message message)
        Save a new message in the database, and add it to the chat.
        Parameters:
        chatId -
        message -
        Returns:
        created message
      • createMessageDTO

        public MessageDTO createMessageDTO​(MessageDTO messageDTO)
        Creates new message based on information from messageDTO and saves it in the database.
        Parameters:
        messageDTO -
        Returns:
        messageDTO