ID - The id type of the notification@MappedSuperclass public abstract class AbstractEmailNotification<ID> extends AbstractNotification<ID> implements com.blazebit.notify.ConfigurationSourceProvider
Notification interface for E-Mail notifications.| Modifier and Type | Field and Description |
|---|---|
static String |
ATTACHMENTS_PARAMETER_NAME
The parameter name for the attachments represented by a
TemplateProcessor producing a collection of Attachment. |
static String |
BODY_HTML_PARAMETER_NAME
The parameter name for the html body which can be a plain
String or a TemplateProcessor. |
static String |
BODY_TEXT_PARAMETER_NAME
The parameter name for the text body which can be a plain
String or a TemplateProcessor. |
static String |
SUBJECT_PARAMETER_NAME
The parameter name for the subject which can be a plain
String or a TemplateProcessor. |
static String |
TEMPLATE_PROCESSOR_TYPE_PARAMETER_NAME
The parameter name for the template processor type
TemplateProcessorKey.getTemplateProcessorResultType(). |
| Constructor and Description |
|---|
AbstractEmailNotification()
Creates an empty notification.
|
AbstractEmailNotification(ID id)
Creates a notification with the given id.
|
| Modifier and Type | Method and Description |
|---|---|
com.blazebit.notify.template.api.TemplateProcessor<Collection<Attachment>> |
getAttachmentProcessor()
Returns the attachment template processor.
|
String |
getBodyHtml()
Returns the html body string.
|
com.blazebit.notify.template.api.TemplateProcessor<String> |
getBodyHtmlTemplateProcessor()
Returns the html body template processor.
|
String |
getBodyText()
Returns the text body string.
|
com.blazebit.notify.template.api.TemplateProcessor<String> |
getBodyTextTemplateProcessor()
Returns the text body template processor.
|
com.blazebit.job.ConfigurationSource |
getConfigurationSource(com.blazebit.notify.NotificationJobContext context) |
Instant |
getDeliveredTime()
Returns the instant at which the E-Mail was delivered.
|
String |
getDeliveryNotification()
Returns the delivery notification.
|
EmailNotificationDeliveryState |
getDeliveryState()
Returns the delivery state.
|
FromEmail |
getFrom()
Returns the
FromEmail. |
Long |
getFromId()
Returns the
FromEmail id. |
String |
getMessageId()
Returns the message id.
|
com.blazebit.notify.NotificationRecipient |
getRecipient() |
EmailNotificationReviewState |
getReviewState()
Returns the review state.
|
String |
getSubject()
Returns the subject string.
|
com.blazebit.notify.template.api.TemplateProcessor<String> |
getSubjectTemplateProcessor()
Returns the subject template processor.
|
String |
getTemplateProcessorType()
Returns the template processor type to use for subject, text body and html body.
|
String |
getTo()
Returns the to E-Mail address.
|
void |
markDone(Object result) |
void |
setAttachmentsTemplateProcessor(com.blazebit.notify.template.api.TemplateProcessor<Collection<Attachment>> attachmentsTemplateProcessor)
Sets the given attachment template processor.
|
void |
setBodyHtml(String bodyHtml)
Sets the given html body.
|
void |
setBodyHtmlTemplateProcessor(com.blazebit.notify.template.api.TemplateProcessor<String> bodyHtmlTemplateProcessor)
Sets the given html body template processor.
|
void |
setBodyText(String bodyText)
Sets the given text body.
|
void |
setBodyTextTemplateProcessor(com.blazebit.notify.template.api.TemplateProcessor<String> bodyTextTemplateProcessor)
Sets the given text body template processor.
|
void |
setDeliveredTime(Instant deliveredTime)
Sets the instant when the E-Mail was delivered.
|
void |
setDeliveryNotification(String deliveryNotification)
Sets the delivery notification.
|
void |
setDeliveryState(EmailNotificationDeliveryState deliveryState)
Sets the delivery state.
|
void |
setFrom(FromEmail from)
Sets the
FromEmail. |
void |
setFromId(Long fromId)
Sets the
FromEmail id. |
void |
setMessageId(String messageId)
Sets the message id.
|
void |
setReviewState(EmailNotificationReviewState reviewState)
Sets the review state.
|
void |
setSubject(String subject)
Sets the given subject.
|
void |
setSubjectTemplateProcessor(com.blazebit.notify.template.api.TemplateProcessor<String> subjectTemplateProcessor)
Sets the given subject template processor.
|
void |
setTemplateProcessorType(String templateProcessorType)
Sets that subject, text body and html body should be processed by a template processor with the given type.
|
void |
setTo(String to)
Sets the to E-Mail address.
|
getChannelType, getDeadline, getExecutionTimeFrames, getJobConfiguration, getMaximumDeferCount, getParameters, getParameterSerializable, isDropable, onChunkSuccess, setChannelType, setDeadline, setDropable, setExecutionTimeFrames, setMaximumDeferCount, setParameters, setParameterSerializablegetCreationTime, getDeferCount, getLastExecutionTime, getScheduleTime, getState, incrementDeferCount, markDeadlineReached, markDropped, markFailed, onPersist, setCreationTime, setDeferCount, setLastExecutionTime, setScheduleTime, setStateequals, getEntityClass, getId, getNoProxyClass, hashCode, id, setIdclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetCreationTime, getDeferCount, getId, getLastExecutionTime, getLastProcessed, getPartitionKey, getScheduleTime, getState, incrementDeferCount, markDeadlineReached, markDeferred, markDropped, markFailed, nextSchedule, setLastExecutionTime, setScheduleTimepublic static final String TEMPLATE_PROCESSOR_TYPE_PARAMETER_NAME
TemplateProcessorKey.getTemplateProcessorResultType().public static final String SUBJECT_PARAMETER_NAME
String or a TemplateProcessor.public static final String BODY_TEXT_PARAMETER_NAME
String or a TemplateProcessor.public static final String BODY_HTML_PARAMETER_NAME
String or a TemplateProcessor.public static final String ATTACHMENTS_PARAMETER_NAME
TemplateProcessor producing a collection of Attachment.public AbstractEmailNotification()
public AbstractEmailNotification(ID id)
id - The notification idpublic void markDone(Object result)
public com.blazebit.notify.NotificationRecipient getRecipient()
getRecipient in interface com.blazebit.notify.Notification<ID>public com.blazebit.job.ConfigurationSource getConfigurationSource(com.blazebit.notify.NotificationJobContext context)
getConfigurationSource in interface com.blazebit.notify.ConfigurationSourceProviderpublic String getTemplateProcessorType()
public void setTemplateProcessorType(String templateProcessorType)
templateProcessorType - The template processor typepublic com.blazebit.notify.template.api.TemplateProcessor<String> getSubjectTemplateProcessor()
public void setSubjectTemplateProcessor(com.blazebit.notify.template.api.TemplateProcessor<String> subjectTemplateProcessor)
subjectTemplateProcessor - The template processorpublic com.blazebit.notify.template.api.TemplateProcessor<String> getBodyTextTemplateProcessor()
public void setBodyTextTemplateProcessor(com.blazebit.notify.template.api.TemplateProcessor<String> bodyTextTemplateProcessor)
bodyTextTemplateProcessor - The template processorpublic com.blazebit.notify.template.api.TemplateProcessor<String> getBodyHtmlTemplateProcessor()
public void setBodyHtmlTemplateProcessor(com.blazebit.notify.template.api.TemplateProcessor<String> bodyHtmlTemplateProcessor)
bodyHtmlTemplateProcessor - The template processorpublic com.blazebit.notify.template.api.TemplateProcessor<Collection<Attachment>> getAttachmentProcessor()
public void setAttachmentsTemplateProcessor(com.blazebit.notify.template.api.TemplateProcessor<Collection<Attachment>> attachmentsTemplateProcessor)
attachmentsTemplateProcessor - The template processorpublic String getSubject()
public void setSubject(String subject)
subject - The subjectpublic String getBodyText()
public void setBodyText(String bodyText)
bodyText - The text bodypublic String getBodyHtml()
public void setBodyHtml(String bodyHtml)
bodyHtml - The html bodypublic void setFromId(Long fromId)
FromEmail id.fromId - The FromEmail id@NotNull public String getTo()
public void setTo(String to)
to - The to E-Mail addresspublic String getMessageId()
public void setMessageId(String messageId)
messageId - The message idpublic Instant getDeliveredTime()
public void setDeliveredTime(Instant deliveredTime)
deliveredTime - The instantpublic String getDeliveryNotification()
public void setDeliveryNotification(String deliveryNotification)
deliveryNotification - The delivery notificationpublic EmailNotificationDeliveryState getDeliveryState()
public void setDeliveryState(EmailNotificationDeliveryState deliveryState)
deliveryState - The delivery state@NotNull public EmailNotificationReviewState getReviewState()
public void setReviewState(EmailNotificationReviewState reviewState)
reviewState - The review stateCopyright © 2018–2019 Blazebit. All rights reserved.