NotificationFactory is a factory interface for creating NotificationMessages.
Classes that implement the interface will create messages in a format they define
and addressed to the recipients they decide. The platform will pass the factory
contextual information that the factory implementation can use when generating
the message.
getNotification(java.lang.Object context)
Returns collection of notification messages based on the given context.
Method Detail
getNotification
public java.util.Collection getNotification(java.lang.Object context)
Returns collection of notification messages based on the given context.
Multiple recipients can be specified within the same notification. Consider
the fact that each recipient might have a different preferred locale, the
subject and message body have to be formated according to the locales.
Parameters:
context - The runtime context associated with the notification.
Depending on the situation where the factory is called, the
context object may be a different class. The factory should
know the situation where it will be used and downcast the
context object accordingly. For example, for workflow
notifications, the platform will pass a different object than
when a lost password is sent.