Class SimpleMessageDataSource
java.lang.Object
net.solarnetwork.central.mail.support.SimpleMessageDataSource
- All Implemented Interfaces:
MessageDataSource
- Direct Known Subclasses:
ClasspathResourceMessageTemplateDataSource
Simple implementation of
MessageDataSource.-
Constructor Summary
ConstructorsConstructorDescriptionSimpleMessageDataSource(String subject) Constructor.SimpleMessageDataSource(String subject, String body) Constructor.SimpleMessageDataSource(String subject, String body, Iterable<org.springframework.core.io.Resource> attachments) Constructor. -
Method Summary
-
Constructor Details
-
SimpleMessageDataSource
Constructor.- Parameters:
subject- the message subject
-
SimpleMessageDataSource
Constructor.- Parameters:
subject- the message subjectbody- the message body
-
SimpleMessageDataSource
public SimpleMessageDataSource(String subject, String body, Iterable<org.springframework.core.io.Resource> attachments) Constructor.- Parameters:
subject- the message subjectbody- the message bodyattachments- the message attachments
-
-
Method Details
-
toString
-
getSubject
Description copied from interface:MessageDataSourceGet the message subject.- Specified by:
getSubjectin interfaceMessageDataSource- Returns:
- the message subject
-
getBody
Description copied from interface:MessageDataSourceGet the message body.- Specified by:
getBodyin interfaceMessageDataSource- Returns:
- the message body, or null if none
-
getAttachments
Description copied from interface:MessageDataSourceGet a collection of message attachments.- Specified by:
getAttachmentsin interfaceMessageDataSource- Returns:
- the attachments, or null if none
-