Class EmailAction
- java.lang.Object
-
- com.floragunn.signals.watch.common.WatchElement
-
- com.floragunn.signals.watch.action.handlers.ActionHandler
-
- com.floragunn.signals.watch.action.handlers.email.EmailAction
-
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
public class EmailAction extends ActionHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEmailAction.Attachmentstatic classEmailAction.Factory-
Nested classes/interfaces inherited from class com.floragunn.signals.watch.action.handlers.ActionHandler
ActionHandler.FactoryRegistry
-
-
Field Summary
Fields Modifier and Type Field Description static StringTYPE-
Fields inherited from class com.floragunn.signals.watch.action.handlers.ActionHandler
factoryRegistry
-
-
Constructor Summary
Constructors Constructor Description EmailAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompileScripts(WatchInitializationService watchInitService)ActionExecutionResultexecute(WatchExecutionContext ctx)StringgetAccount()Map<String,EmailAction.Attachment>getAttachments()List<String>getBcc()StringgetBody()List<String>getCc()StringgetFrom()StringgetHtmlBody()StringgetReplyTo()StringgetSubject()List<String>getTo()StringgetType()voidsetAccount(String account)voidsetAttachments(Map<String,EmailAction.Attachment> attachments)voidsetBcc(List<String> bcc)voidsetBody(String body)voidsetCc(List<String> cc)voidsetFrom(String from)voidsetHtmlBody(String htmlBody)voidsetReplyTo(String replyTo)voidsetSubject(String subject)voidsetTo(List<String> to)org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)-
Methods inherited from class com.floragunn.signals.watch.action.handlers.ActionHandler
create, create, parseJson, toJson
-
Methods inherited from class com.floragunn.signals.watch.common.WatchElement
getChildByNameAndType, getChildByNameAndType, getChildren, getName, render, render
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
compileScripts
public void compileScripts(WatchInitializationService watchInitService) throws com.floragunn.searchsupport.config.validation.ConfigValidationException
- Throws:
com.floragunn.searchsupport.config.validation.ConfigValidationException
-
execute
public ActionExecutionResult execute(WatchExecutionContext ctx) throws ActionExecutionException
- Specified by:
executein classActionHandler- Throws:
ActionExecutionException
-
getType
public String getType()
- Specified by:
getTypein classActionHandler
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Throws:
IOException
-
getHtmlBody
public String getHtmlBody()
-
setHtmlBody
public void setHtmlBody(String htmlBody)
-
getAccount
public String getAccount()
-
setAccount
public void setAccount(String account)
-
getSubject
public String getSubject()
-
setSubject
public void setSubject(String subject)
-
getFrom
public String getFrom()
-
setFrom
public void setFrom(String from)
-
getBody
public String getBody()
-
setBody
public void setBody(String body)
-
getAttachments
public Map<String,EmailAction.Attachment> getAttachments()
-
setAttachments
public void setAttachments(Map<String,EmailAction.Attachment> attachments)
-
getReplyTo
public String getReplyTo()
-
setReplyTo
public void setReplyTo(String replyTo)
-
-