Class MessageType

    • Field Detail

      • setup

        protected final Setup setup
      • reading

        protected volatile boolean reading
      • unprocessedMessagesCount

        protected volatile java.lang.Integer unprocessedMessagesCount
    • Method Detail

      • getSearchMap

        public java.util.Map<java.lang.Integer,​MessageTypeSearch> getSearchMap()
      • getUnprocessedMessagesCount

        public java.lang.Integer getUnprocessedMessagesCount()
        Count of unprocessed messages.
        Returns:
        value or null if unknown.
      • process

        public void process()
        Send and extract messages.
      • isAnswerSupport

        public boolean isAnswerSupport()
      • getAnswerMessage

        public Message getAnswerMessage​(Message original)
      • isEditable

        public boolean isEditable​(Message message)
      • isRemovable

        public boolean isRemovable​(Message message)
      • isProcessChangeSupport

        public boolean isProcessChangeSupport()
      • getViewerJsp

        public java.lang.String getViewerJsp()
        Plugin's endpoint for unprocessed message viewing.
        Returns:
      • getHeaderJsp

        public java.lang.String getHeaderJsp()
        Plugin's endpoint for process message header.
        Returns:
      • getEditorJsp

        public java.lang.String getEditorJsp()
        Plugin's endpoint for process message editor.
        Returns:
      • isAttachmentSupport

        public boolean isAttachmentSupport()
      • getProcessMessageHeaderColor

        public java.lang.String getProcessMessageHeaderColor​(Message message)
      • newMessageList

        public java.util.List<Message> newMessageList​(ConnectionSet conSet)
                                               throws java.lang.Exception
        List of unprocessed messages from storage, for example - E-Mails from IMAP folder.
        Parameters:
        conSet -
        Returns:
        Throws:
        java.lang.Exception
      • newMessageGet

        public Message newMessageGet​(ConnectionSet conSet,
                                     java.lang.String messageId)
                              throws java.lang.Exception
        Gets unprocessed message from storage.
        Parameters:
        conSet -
        messageId - unique ID.
        Returns:
        Throws:
        java.lang.Exception
      • messageDelete

        public void messageDelete​(ConnectionSet conSet,
                                  java.lang.String... messageIds)
                           throws java.lang.Exception
        Deletes both processed and unprocessed messages.
        Parameters:
        conSet -
        messageIds - set with int DB IDs or type related string IDs.
        Throws:
        java.lang.Exception
      • newMessageLoad

        public Message newMessageLoad​(java.sql.Connection con,
                                      java.lang.String messageId)
                               throws java.lang.Exception
        Gets unprocessed message from storage and persists it in DB.
        Parameters:
        con -
        messageId -
        Returns:
        Throws:
        java.lang.Exception
      • updateMessage

        public abstract void updateMessage​(java.sql.Connection con,
                                           DynActionForm form,
                                           Message message)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getMessageDescription

        public java.lang.String getMessageDescription​(java.lang.String lang,
                                                      Message message)
        Generates short message description.
        Parameters:
        lang - language.
        message - message with the type.
        Returns:
      • messageLinkedToProcess

        public Message messageLinkedToProcess​(Message message)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception