All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fr.sii.ogham.email.sender.impl.sendgrid.handler.SendGridContentHandler Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package fr.sii.ogham.email.sender.impl.sendgrid.handler;

import com.sendgrid.SendGrid;

import fr.sii.ogham.core.message.content.Content;
import fr.sii.ogham.email.exception.sendgrid.ContentHandlerException;

/**
 * Description of the operations a content handler used with emails sent to
 * SendGrid should implement. To have content handlers separate from senders
 * improves extensibility, as content types can be added in the future without
 * having to modify the sender class.
 * 
 */
public interface SendGridContentHandler {

	/**
	 * Reads the content and adds it into the email. This method is expected to
	 * update the content of the {@code email} parameter.
	 * 
	 * @param email
	 *            the email to put the content in
	 * @param content
	 *            the unprocessed content
	 * @throws ContentHandlerException
	 *             the handler is unable to add the content to the email
	 */
	void setContent(SendGrid.Email email, Content content) throws ContentHandlerException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy