Class MessageTypeEmail
java.lang.Object
org.bgerp.model.base.Id
org.bgerp.model.base.IdTitle
ru.bgcrm.dao.message.MessageType
org.bgerp.plugin.msg.email.message.MessageTypeEmail
- See Also:
-
Field Summary
Fields inherited from class MessageType
configMap, unprocessedMessagesCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAnswerMessage(Message original) protected StringgetAnswerSubject(String subject) Plugin's endpoint for process message editorgetEmail()getMessageDescription(String lang, Message message) Generates short message descriptionbooleanbooleanisEditable(Message message) Can a message be editedbooleanbooleanbooleanisRemovable(Message message) voidmessageDelete(ConnectionSet conSet, String... messageIds) Deletes both processed and unprocessed messagesmessageLinkedToProcess(Message message) newMessageGet(ConnectionSet conSet, String messageId) Gets unprocessed message from storagenewMessageList(ConnectionSet conSet, String from) List of unprocessed messages from storage, for example - E-Mails from IMAP foldernewMessageLoad(Connection con, String messageId) Gets unprocessed message from storage and persists it in DBvoidprocess()Sends and reads message listvoidupdateMessage(Connection con, DynActionForm form, Message message) Methods inherited from class MessageType
answerText, getConfigMap, getContactSaver, getProcessMessageHeaderColor, getSearchMap, getUnprocessedMessagesCount, isCheckEmptySubject, isReading, processMessageAttaches, searchObjectsForLink
-
Constructor Details
-
MessageTypeEmail
- Throws:
BGMessageException
-
-
Method Details
-
getEmail
-
isAnswerSupport
public boolean isAnswerSupport()- Overrides:
isAnswerSupportin classMessageType
-
getAnswerMessage
- Overrides:
getAnswerMessagein classMessageType
-
getAnswerSubject
-
isEditable
Description copied from class:MessageTypeCan a message be edited- Overrides:
isEditablein classMessageType- Parameters:
message- the message,nullfor adding a message of the type- Returns:
trueif editable
-
isRemovable
- Overrides:
isRemovablein classMessageType
-
isReadable
public boolean isReadable()- Overrides:
isReadablein classMessageType- Returns:
- possibility to mark message as read/unread using kernel logic
-
isProcessChangeSupport
public boolean isProcessChangeSupport()- Overrides:
isProcessChangeSupportin classMessageType
-
getViewerJsp
- Overrides:
getViewerJspin classMessageType- Returns:
- Plugin's endpoint for unprocessed message viewing
-
getHeaderJsp
- Overrides:
getHeaderJspin classMessageType- Returns:
- Plugin's endpoint for process message header
-
getMessageDescription
Description copied from class:MessageTypeGenerates short message description- Overrides:
getMessageDescriptionin classMessageType- Parameters:
lang- languagemessage- message with the type- Returns:
- the description
-
getEditorJsp
Description copied from class:MessageTypePlugin's endpoint for process message editor- Overrides:
getEditorJspin classMessageType- Returns:
- the JSP path, or
null
-
process
public void process()Description copied from class:MessageTypeSends and reads message list- Overrides:
processin classMessageType
-
newMessageList
Description copied from class:MessageTypeList of unprocessed messages from storage, for example - E-Mails from IMAP folder- Overrides:
newMessageListin classMessageType- Parameters:
conSet- DB connectionsfrom- optional substring filter by sender- Returns:
- the new messages
- Throws:
Exception
-
newMessageGet
Description copied from class:MessageTypeGets unprocessed message from storage- Overrides:
newMessageGetin classMessageType- Parameters:
conSet- DB connectionsmessageId- unique ID- Returns:
- the message, or
nullif not found - Throws:
Exception
-
messageDelete
Description copied from class:MessageTypeDeletes both processed and unprocessed messages- Overrides:
messageDeletein classMessageType- Parameters:
conSet- DB connectionsmessageIds- set with int DB IDs or type related string IDs- Throws:
Exception
-
newMessageLoad
Description copied from class:MessageTypeGets unprocessed message from storage and persists it in DB- Overrides:
newMessageLoadin classMessageType- Parameters:
con- the DB connectionmessageId- the message ID- Returns:
- the loaded message, or
null - Throws:
Exception
-
updateMessage
- Specified by:
updateMessagein classMessageType- Throws:
Exception
-
messageLinkedToProcess
- Overrides:
messageLinkedToProcessin classMessageType
-