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,MessageTypeEmail,MessageTypeHelpDesk,MessageTypeNote
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMessageType(Setup setup, int id, String title, ConfigMap config) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringanswerText(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.booleanbooleanbooleanisEditable(Message message) Can a message be editedbooleanbooleanbooleanMessage type is currently runningnewMessageList(ConnectionSet).booleanisRemovable(Message message) voidmessageDelete(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.voidprocess()Sends and reads message list.processMessageAttaches(Connection con, DynActionForm form, Message message) searchObjectsForLink(Message message) abstract voidupdateMessage(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
-
isEditable
Can a message be edited- Parameters:
message- the message,nullfor adding a message of the type- Returns:
-
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
Generates short message description.- Parameters:
lang- language.message- message with the type.- Returns:
-
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
-