Package ru.bgcrm.dao.message

# Class MessageTypeCall

java.lang.Object
org.bgerp.model.base.Id
org.bgerp.model.base.IdTitle
ru.bgcrm.dao.message.MessageType
ru.bgcrm.dao.message.MessageTypeCall

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

public class MessageTypeCall extends MessageType

See Also:
  - Serialized Form

- ## Field Summary

  ### 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
  `MessageTypeCall(Setup setup, int id, ConfigMap config)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CallRegistration`
  `getRegistrationByNumber(String number)`
  `CallRegistration`
  `getRegistrationByUser(int userId)`
  `String`
  `getUserOfferedNumber(int userId)`
  Retrieves user offered number from text parameter.
  `boolean`
  `isProcessChangeSupport()`
  `void`
  `messageDelete(ConnectionSet conSet, String... messageIds)`
  Deletes both processed and unprocessed messages.
  `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`
  `numberFree(int userId)`
  `void`
  `numberRegister(int userId, String number)`
  `void`
  `outNumbersPreprocess(ParameterPhoneValue value, Process process)`
  `void`
  `updateMessage(Connection con, DynActionForm form, Message message)`

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

  `answerText, getAnswerMessage, getConfigMap, getContactSaver, getEditorJsp, getHeaderJsp, getMessageDescription, getProcessMessageHeaderColor, getSearchMap, getUnprocessedMessagesCount, getViewerJsp, isAnswerSupport, isCheckEmptySubject, isEditable, isReadable, isReading, isRemovable, messageLinkedToProcess, process, 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`

- ## Constructor Details

  - ### MessageTypeCall

    public MessageTypeCall(Setup setup, int id, ConfigMap config)

- ## Method Details

  - ### isProcessChangeSupport

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

  - ### getUserOfferedNumber

    public String getUserOfferedNumber(int userId)
    Retrieves user offered number from text parameter.
    Parameters:
      `userId` - user entity ID.
    Returns:
      parameter value or empty string.

  - ### outNumbersPreprocess

    public void outNumbersPreprocess(ParameterPhoneValue value, Process process)

  - ### numberRegister

    public void numberRegister(int userId, String number)

  - ### numberFree

    public void numberFree(int userId)

  - ### getRegistrationByUser

    public CallRegistration getRegistrationByUser(int userId)

  - ### getRegistrationByNumber

    public CallRegistration getRegistrationByNumber(String number)

  - ### updateMessage

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

  - ### newMessageList

    public List<Message> newMessageList(ConnectionSet conSet) throws SQLException
    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:
      `SQLException`

  - ### 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`