Class MessageType

All Implemented Interfaces:
Serializable, Id<Integer>, IdTitle<Integer>, Title
Direct Known Subclasses:
MessageTypeCall, MessageTypeChannel, MessageTypeEmail, MessageTypeForumPost, MessageTypeHelpDesk, MessageTypeNote

public abstract class MessageType extends IdTitle
See Also:
  • Field Details

    • setup

      protected final Setup setup
    • configMap

      protected final ConfigMap configMap
    • reading

      protected volatile boolean reading
    • unprocessedMessagesCount

      protected volatile Integer unprocessedMessagesCount
  • Constructor Details

  • Method Details

    • getConfigMap

      public ConfigMap getConfigMap()
    • getSearchMap

      public Map<Integer,MessageTypeSearch> getSearchMap()
    • getContactSaver

      public MessageTypeContactSaver getContactSaver()
    • isReading

      public boolean isReading()
      Message type is currently running newMessageList(ConnectionSet).
      Returns:
    • getUnprocessedMessagesCount

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

      public void process()
      Sends and reads message list.
    • isAnswerSupport

      public boolean isAnswerSupport()
    • getAnswerMessage

      public Message getAnswerMessage(Message original)
    • answerText

      protected String answerText(String text)
    • isEditable

      public boolean isEditable(Message message)
    • isRemovable

      public boolean isRemovable(Message message)
    • isProcessChangeSupport

      public boolean isProcessChangeSupport()
    • getViewerJsp

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

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

      public boolean isReadable()
      Returns:
      possibility to mark message as read/unread using kernel logic.
    • getEditorJsp

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

      public boolean isAttachmentSupport()
    • getProcessMessageHeaderColor

      public String getProcessMessageHeaderColor(Message message)
    • newMessageList

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

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

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

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

      public abstract void updateMessage(Connection con, DynActionForm form, Message message) throws Exception
      Throws:
      Exception
    • getMessageDescription

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

      public List<CommonObjectLink> searchObjectsForLink(Message message)
    • messageLinkedToProcess

      public Message messageLinkedToProcess(Message message) throws Exception
      Throws:
      Exception
    • processMessageAttaches

      protected Map<Integer,FileInfo> processMessageAttaches(Connection con, DynActionForm form, Message message) throws Exception
      Throws:
      Exception