Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wli.worklist.api.config
Interface EmailRecipientCalculator

    public interface EmailRecipientCalculator

Defines a pluggable implementation of a calculator that can produce the email addresses of actors that are to receive email notifications for a given TaskEvent. This interface is really only intended to provide a simple facility for augmenting the To: list for emails that are already getting sent from the default email subsystem in Worklist. If you need to control the subject, body, or other attributes of emails being sent, you should define your own custom event listener from which you can send custom emails.

Implementations of this interface MUST provide a public default (no arg) constructor. Implementations must make no assumptions about the lifecycle of their instances nor their relationship to other instances. Lifecycle is controlled entirely via the initialize() and destroy() methods.

Method Summary
`void` | `destroy()` Destroy this instance and release any resources obtained in initialize or during calls to getEmailRecipientsForEvent().
`String[]` | `getEmailRecipientsForEvent(TaskEvent event, Set<String> currentRecipients)` Calculate the email addresses for any actors that should receive email notification for the given event.
`void` | `initialize()` Initialize any resources needed to start calculating email addresses in getEmailRecipientsForEvent().
`void` | `setProperties(Property[] properties)` Set any properties configured for this EmailRecipientCalculator in the custom module that deployed it.

Method Detail

### setProperties

    void setProperties(Property[] properties)

  Set any properties configured for this EmailRecipientCalculator in the custom module that deployed it. This method is only called if properties are available (e.g. specified in the deployment descriptor for the custom module). Note this method (if called at all) is called prior to the call to the initialize lifecycle method.

  Parameters:
    `properties` -

### initialize

    void initialize()
                    throws ManagementException

  Initialize any resources needed to start calculating email addresses in getEmailRecipientsForEvent().

  Throws:
    `ManagementException`

### destroy

    void destroy()
                 throws ManagementException

  Destroy this instance and release any resources obtained in initialize or during calls to getEmailRecipientsForEvent().

  Throws:
    `ManagementException`

### getEmailRecipientsForEvent

    String[] getEmailRecipientsForEvent(TaskEvent event,
                                        Set<String> currentRecipients)
                                        throws ManagementException

  Calculate the email addresses for any actors that should receive email notification for the given event. If no email notifications are to be sent, this method may return null or an empty array.

  Parameters:
    `event` - The event for which email notifications are to be sent.
    `currentRecipients` - This is a set of email addresses to which the email for this event will already be sent. This set is a copy of the set that will be used to populate the To: list on the email, so adding/removing items in this set has no effect.
  Returns:
    An array of email addresses for actors that should get email notifications in response to the event. These actors will receive an email with a pre-determined subject and body. The body will contain a URL to the task that caused this event. The URL may optionally be calculated by installing a TaskURLCalculator.
  Throws:
    `ManagementException` - If any error occurs calculating recipients. This error will be logged to the server log, but otherwise will not alter the handling of this event.
  See Also:
    `TaskURLCalculator`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD