Class EmailEventManager


  • @ApplicationScoped
    public class EmailEventManager
    extends Object
    This singleton class, is in charge of generating events to send emails.
    Author:
    asier
    See Also:
    EmailEventContentGenerator
    • Constructor Detail

      • EmailEventManager

        public EmailEventManager()
    • Method Detail

      • sendEmail

        public boolean sendEmail​(String event,
                                 String recipient,
                                 Object data)
                          throws EmailEventException
        This method is invoked when an event for sending emails is generated. It looks for all EmailEventContentGenerator classes listening to this event and generates an email using them.
        Parameters:
        event - Name of the event to send emails for
        recipient - Email address of the email's recipient
        data - Object that the EmailEventContentGenerator will receive to generate the email
        Returns:
        true in case at least one email has been sent
        Throws:
        EmailEventException - is thrown in case of problems sending the email or getting the email server configuration
        See Also:
        EmailEventContentGenerator