Package ru.bgcrm.dao.message
Class MessageType
java.lang.Object
org.bgerp.model.base.Id
org.bgerp.model.base.IdTitle
ru.bgcrm.dao.message.MessageType
- Direct Known Subclasses:
MessageTypeCall
,MessageTypeChannel
,MessageTypeEmail
,MessageTypeHelpDesk
,MessageTypeNote
- See Also:
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
MessageType
(Setup setup, int id, String title, ConfigMap config) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
answerText
(String text) getAnswerMessage
(Message original) Plugin's endpoint for process message editor.getMessageDescription
(String lang, Message message) Generates short message description.getProcessMessageHeaderColor
(Message message) Count of unprocessed messages.boolean
boolean
boolean
boolean
isEditable
(Message message) boolean
boolean
boolean
Message type is currently runningnewMessageList(ConnectionSet)
.boolean
isRemovable
(Message message) void
messageDelete
(ConnectionSet conSet, String... messageIds) Deletes both processed and unprocessed messages.messageLinkedToProcess
(Message message) newMessageGet
(ConnectionSet conSet, String messageId) Gets unprocessed message from storage.newMessageList
(ConnectionSet conSet) List of unprocessed messages from storage, for example - E-Mails from IMAP folder.newMessageLoad
(Connection con, String messageId) Gets unprocessed message from storage and persists it in DB.void
process()
Sends and reads message list.processMessageAttaches
(Connection con, DynActionForm form, Message message) searchObjectsForLink
(Message message) abstract void
updateMessage
(Connection con, DynActionForm form, Message message)
-
Field Details
-
setup
-
configMap
-
unprocessedMessagesCount
-
-
Constructor Details
-
MessageType
-
-
Method Details
-
getConfigMap
-
getSearchMap
-
getContactSaver
-
isCheckEmptySubject
public boolean isCheckEmptySubject() -
isReading
public boolean isReading()Message type is currently runningnewMessageList(ConnectionSet)
.- Returns:
-
getUnprocessedMessagesCount
Count of unprocessed messages.- Returns:
- value or null if unknown.
-
isAnswerSupport
public boolean isAnswerSupport() -
getAnswerMessage
-
answerText
-
isAttachmentSupport
public boolean isAttachmentSupport() -
isEditable
-
isRemovable
-
isProcessChangeSupport
public boolean isProcessChangeSupport() -
getViewerJsp
- Returns:
- Plugin's endpoint for unprocessed message viewing.
-
getProcessMessageHeaderColor
-
getHeaderJsp
- Returns:
- Plugin's endpoint for process message header.
-
getMessageDescription
Generates short message description.- Parameters:
lang
- language.message
- message with the type.- Returns:
-
isReadable
public boolean isReadable()- Returns:
- possibility to mark message as read/unread using kernel logic.
-
getEditorJsp
Plugin's endpoint for process message editor.- Returns:
-
process
public void process()Sends and reads message list. -
newMessageList
List of unprocessed messages from storage, for example - E-Mails from IMAP folder.- Parameters:
conSet
-- Returns:
- Throws:
Exception
-
newMessageGet
Gets unprocessed message from storage.- Parameters:
conSet
-messageId
- unique ID.- Returns:
- Throws:
Exception
-
messageDelete
Deletes both processed and unprocessed messages.- Parameters:
conSet
-messageIds
- set with int DB IDs or type related string IDs.- Throws:
Exception
-
newMessageLoad
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
-
searchObjectsForLink
-
messageLinkedToProcess
- Throws:
Exception
-
processMessageAttaches
protected Map<Integer,FileInfo> processMessageAttaches(Connection con, DynActionForm form, Message message) throws Exception - Throws:
Exception
-