Class MessageType
java.lang.Object
org.bgerp.model.base.Id
org.bgerp.model.base.IdTitle
ru.bgcrm.dao.message.MessageType
- Direct Known Subclasses:
MessageTypeCall, MessageTypeEmail, MessageTypeHelpDesk, MessageTypeNote
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringanswerText(String text) getAnswerMessage(Message original) Plugin's endpoint for process message editorgetMessageDescription(String lang, Message message) Generates short message descriptiongetProcessMessageHeaderColor(Message message) Count of unprocessed messagesbooleanbooleanbooleanisEditable(Message message) Can a message be editedbooleanbooleanbooleanMessage type is currently runningnewMessageList(ConnectionSet, String)booleanisRemovable(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 listprocessMessageAttaches(Connection con, DynActionForm form, Message message) searchObjectsForLink(Message message) abstract voidupdateMessage(Connection con, DynActionForm form, Message message)
-
Field Details
-
configMap
-
unprocessedMessagesCount
-
-
Constructor Details
-
MessageType
-
-
Method Details
-
getConfigMap
-
getSearchMap
-
getContactSaver
-
isCheckEmptySubject
public boolean isCheckEmptySubject() -
isReading
public boolean isReading()Message type is currently runningnewMessageList(ConnectionSet, String)- Returns:
trueif reading
-
getUnprocessedMessagesCount
Count of unprocessed messages- Returns:
- value or null if unknown
-
isAnswerSupport
public boolean isAnswerSupport() -
getAnswerMessage
-
answerText
-
isEditable
Can a message be edited- Parameters:
message- the message,nullfor adding a message of the type- Returns:
trueif editable
-
isRemovable
-
isReadable
public boolean isReadable()- Returns:
- possibility to mark message as read/unread using kernel logic
-
isProcessChangeSupport
public boolean isProcessChangeSupport() -
getViewerJsp
- Returns:
- Plugin's endpoint for unprocessed message viewing
-
getProcessMessageHeaderColor
-
getHeaderJsp
- Returns:
- Plugin's endpoint for process message header
-
getMessageDescription
-
getEditorJsp
Plugin's endpoint for process message editor- Returns:
- the JSP path, or
null
-
process
public void process()Sends and reads message list -
newMessageList
-
newMessageGet
Gets unprocessed message from storage- Parameters:
conSet- DB connectionsmessageId- unique ID- Returns:
- the message, or
nullif not found - Throws:
Exception
-
messageDelete
Deletes both processed and unprocessed messages- Parameters:
conSet- DB connectionsmessageIds- 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- the DB connectionmessageId- the message ID- Returns:
- the loaded message, or
null - Throws:
Exception
-
updateMessage
public abstract void updateMessage(Connection con, DynActionForm form, Message message) throws Exception - Throws:
Exception
-
searchObjectsForLink
-
messageLinkedToProcess
-
processMessageAttaches
protected Map<Integer,FileInfo> processMessageAttaches(Connection con, DynActionForm form, Message message) throws Exception - Throws:
Exception
-