Package org.bgerp.plugin.msg.email

# Class ExpressionObject

java.lang.Object
org.bgerp.dao.expression.ExpressionContextAccessingObject
org.bgerp.plugin.msg.email.ExpressionObject

All Implemented Interfaces:
  `ExpressionObject`

public class ExpressionObject extends ExpressionContextAccessingObject

- ## Field Summary

  ### Fields inherited from class org.bgerp.dao.expression.ExpressionContextAccessingObject

  `context`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExpressionObject()`
  `ExpressionObject(Process process, DynActionForm form, Connection con)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `sendMessageToExecutors(int paramId, String subject, String text)`
  Send email to process' executors, except ones from the current `DynActionForm`
  `void`
  `sendMessageToUsers(Iterable<Integer> userIds, int paramId, String subject, String text)`
  Send email to users
  `void`
  `toContext(Map<String,Object> context)`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ExpressionObject

    public ExpressionObject()

  - ### ExpressionObject

    public ExpressionObject(Process process, DynActionForm form, Connection con) throws Exception
    Throws:
      `Exception`

- ## Method Details

  - ### toContext

    public void toContext(Map<String,Object> context)
    Specified by:
      `toContext` in interface `ExpressionObject`
    Overrides:
      `toContext` in class `ExpressionContextAccessingObject`

  - ### sendMessageToExecutors

    public void sendMessageToExecutors(int paramId, String subject, String text) throws BGMessageException, SQLException, jakarta.mail.MessagingException
    Send email to process' executors, except ones from the current `DynActionForm`
    Parameters:
      `paramId` - user parameter ID with type 'email', use `0` for using the first user parameter with this type
      `subject` - message subject
      `text` - message text
    Throws:
      `BGMessageException`
      `SQLException`
      `jakarta.mail.MessagingException`

  - ### sendMessageToUsers

    public void sendMessageToUsers(Iterable<Integer> userIds, int paramId, String subject, String text) throws BGMessageException, SQLException, jakarta.mail.MessagingException
    Send email to users
    Parameters:
      `userIds` - recipient user IDs
      `paramId` - user parameter ID with type 'email', use `0` for using the first user parameter with this type
      `subject` - message subject
      `text` - message text
    Throws:
      `BGMessageException`
      `SQLException`
      `jakarta.mail.MessagingException`