public interface EmailBuilder
EmailBuilder builds Emails based on a given NotificationContext and Event.
The builders are OSGi services that are looked up as service references while sending an email for an occurring
notification.
Email builders are specific to a Event type, and as such must provide an scr property named "topic"
indicating the event topic it wants to process.| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(NotificationContext context,
org.osgi.service.event.Event event)
Indicates whether this email builder accepts the given
NotificationContext and Event to build an
email from. |
org.apache.commons.mail.Email |
build(NotificationContext context,
org.osgi.service.event.Event event,
java.lang.String addressFrom)
Builds an email message from the given notification context and event.
|
boolean |
shouldBuild(NotificationContext context,
org.osgi.service.event.Event event)
Indicates whether this email builder should build the email given the
NotificationContext and Event |
boolean accepts(NotificationContext context, org.osgi.service.event.Event event)
NotificationContext and Event to build an
email from.context - The notification context.event - The event.true if the email builder accepts the context and event.boolean shouldBuild(NotificationContext context, org.osgi.service.event.Event event)
NotificationContext and Eventcontext - The notification context.event - The event.true if the email builder should build the email.org.apache.commons.mail.Email build(NotificationContext context, org.osgi.service.event.Event event, java.lang.String addressFrom)
context - The notification context.event - The event.addressFrom - The address from with to send the email."Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"