Package org.bgerp.plugin.msg.email.message

# 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

All Implemented Interfaces:
  `Serializable`, `Id<Integer>`, `IdTitle<Integer>`, `Title`

public class MessageTypeEmail extends MessageType

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `RE_PREFIX`
  Deprecated.

  ### Fields inherited from class ru.bgcrm.dao.message.MessageType

  `configMap, setup, unprocessedMessagesCount`

  ### Fields inherited from class org.bgerp.model.base.IdTitle

  `title`

  ### Fields inherited from class org.bgerp.model.base.Id

  `id`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MessageTypeEmail(Setup setup, int id, ConfigMap config)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Message`
  `getAnswerMessage(Message original)`
  `protected String`
  `getAnswerSubject(String subject)`
  `String`
  `getEditorJsp()`
  Plugin's endpoint for process message editor.
  `String`
  `getEmail()`
  `String`
  `getHeaderJsp()`
  `String`
  `getMessageDescription(String lang, Message message)`
  Generates short message description.
  `String`
  `getViewerJsp()`
  `boolean`
  `isAnswerSupport()`
  `boolean`
  `isEditable(Message message)`
  Can a message be edited
  `boolean`
  `isProcessChangeSupport()`
  `boolean`
  `isReadable()`
  `boolean`
  `isRemovable(Message message)`
  `void`
  `messageDelete(ConnectionSet conSet, String... messageIds)`
  Deletes both processed and unprocessed messages.
  `Message`
  `messageLinkedToProcess(Message message)`
  `Message`
  `newMessageGet(ConnectionSet conSet, String messageId)`
  Gets unprocessed message from storage.
  `List<Message>`
  `newMessageList(ConnectionSet conSet)`
  List of unprocessed messages from storage, for example - E-Mails from IMAP folder.
  `Message`
  `newMessageLoad(Connection con, String messageId)`
  Gets unprocessed message from storage and persists it in DB.
  `void`
  `process()`
  Sends and reads message list.
  `void`
  `updateMessage(Connection con, DynActionForm form, Message message)`

  ### Methods inherited from class ru.bgcrm.dao.message.MessageType

  `answerText, getConfigMap, getContactSaver, getProcessMessageHeaderColor, getSearchMap, getUnprocessedMessagesCount, isCheckEmptySubject, isReading, processMessageAttaches, searchObjectsForLink`

  ### Methods inherited from class org.bgerp.model.base.IdTitle

  `getTitle, setTitle, toString, unknown`

  ### Methods inherited from class org.bgerp.model.base.Id

  `equals, getId, hashCode, setId`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.bgerp.model.base.iface.Id

  `getId`

- ## Field Details

  - ### RE_PREFIX

    @Deprecated public static final String RE_PREFIX
    Deprecated.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### MessageTypeEmail

    public MessageTypeEmail(Setup setup, int id, ConfigMap config) throws BGMessageException
    Throws:
      `BGMessageException`

- ## Method Details

  - ### getEmail

    public String getEmail()

  - ### isAnswerSupport

    public boolean isAnswerSupport()
    Overrides:
      `isAnswerSupport` in class `MessageType`

  - ### getAnswerMessage

    public Message getAnswerMessage(Message original)
    Overrides:
      `getAnswerMessage` in class `MessageType`

  - ### getAnswerSubject

    protected String getAnswerSubject(String subject)

  - ### isEditable

    public boolean isEditable(Message message)
    Description copied from class: `MessageType`
    Can a message be edited
    Overrides:
      `isEditable` in class `MessageType`
    Parameters:
      `message` - the message, `null` for adding a message of the type
    Returns:

  - ### isRemovable

    public boolean isRemovable(Message message)
    Overrides:
      `isRemovable` in class `MessageType`

  - ### isReadable

    public boolean isReadable()
    Overrides:
      `isReadable` in class `MessageType`
    Returns:
      possibility to mark message as read/unread using kernel logic

  - ### isProcessChangeSupport

    public boolean isProcessChangeSupport()
    Overrides:
      `isProcessChangeSupport` in class `MessageType`

  - ### getViewerJsp

    public String getViewerJsp()
    Overrides:
      `getViewerJsp` in class `MessageType`
    Returns:
      Plugin's endpoint for unprocessed message viewing.

  - ### getHeaderJsp

    public String getHeaderJsp()
    Overrides:
      `getHeaderJsp` in class `MessageType`
    Returns:
      Plugin's endpoint for process message header.

  - ### getMessageDescription

    public String getMessageDescription(String lang, Message message)
    Description copied from class: `MessageType`
    Generates short message description.
    Overrides:
      `getMessageDescription` in class `MessageType`
    Parameters:
      `lang` - language.
      `message` - message with the type.
    Returns:

  - ### getEditorJsp

    public String getEditorJsp()
    Description copied from class: `MessageType`
    Plugin's endpoint for process message editor.
    Overrides:
      `getEditorJsp` in class `MessageType`
    Returns:

  - ### process

    public void process()
    Description copied from class: `MessageType`
    Sends and reads message list.
    Overrides:
      `process` in class `MessageType`

  - ### newMessageList

    public List<Message> newMessageList(ConnectionSet conSet) throws Exception
    Description copied from class: `MessageType`
    List of unprocessed messages from storage, for example - E-Mails from IMAP folder.
    Overrides:
      `newMessageList` in class `MessageType`
    Parameters:
      `conSet` -
    Returns:
    Throws:
      `Exception`

  - ### newMessageGet

    public Message newMessageGet(ConnectionSet conSet, String messageId) throws Exception
    Description copied from class: `MessageType`
    Gets unprocessed message from storage.
    Overrides:
      `newMessageGet` in class `MessageType`
    Parameters:
      `conSet` -
      `messageId` - unique ID.
    Returns:
    Throws:
      `Exception`

  - ### messageDelete

    public void messageDelete(ConnectionSet conSet, String... messageIds) throws Exception
    Description copied from class: `MessageType`
    Deletes both processed and unprocessed messages.
    Overrides:
      `messageDelete` in class `MessageType`
    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
    Description copied from class: `MessageType`
    Gets unprocessed message from storage and persists it in DB.
    Overrides:
      `newMessageLoad` in class `MessageType`
    Parameters:
      `con` -
      `messageId` -
    Returns:
    Throws:
      `Exception`

  - ### updateMessage

    public void updateMessage(Connection con, DynActionForm form, Message message) throws Exception
    Specified by:
      `updateMessage` in class `MessageType`
    Throws:
      `Exception`

  - ### messageLinkedToProcess

    public Message messageLinkedToProcess(Message message)
    Overrides:
      `messageLinkedToProcess` in class `MessageType`