Class SendMailWorkflowAction
- java.lang.Object
-
- de.uplanet.lucy.server.workflow.action.AbstractWorkflowAction
-
- de.uplanet.lucy.server.workflow.action.SendMailWorkflowAction
-
- All Implemented Interfaces:
IActivatableWorkflowObject
,INamedWorkflowObject
,INeedWorkflow
,INeedWorkflowDirectory
,IWorkflowAction
,IWorkflowObject
,Serializable
public final class SendMailWorkflowAction extends AbstractWorkflowAction implements INeedWorkflowDirectory
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SendMailWorkflowAction.AbstractRecipients
static class
SendMailWorkflowAction.RecipientsBcc
static class
SendMailWorkflowAction.RecipientsCc
static class
SendMailWorkflowAction.RecipientsReplyTo
static class
SendMailWorkflowAction.RecipientsTo
static class
SendMailWorkflowAction.Subject
Configuration of the email subject.
-
Field Summary
-
Fields inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject
GUID_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description SendMailWorkflowAction(String p_strGuid)
Create a mail workflow action.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getHeaders()
Get the email headers.String
getLanguage()
Get the language.MAIL_TYPE
getMailType()
Get the type of the email.ON_ERROR_MODE
getNoRecipientErrorMode()
This property determines if an exception should be thrown if the mail has no recipients.String
getProcessingContextSenderAddress()
SendMailWorkflowAction.RecipientsBcc
getRecipientsBcc()
Get the BCC recipients.SendMailWorkflowAction.RecipientsCc
getRecipientsCc()
Get the CC recipients.SendMailWorkflowAction.RecipientsReplyTo
getRecipientsReplyTo()
Get the Reply-To recipients.SendMailWorkflowAction.RecipientsTo
getRecipientsTo()
Get the TO recipients.String
getSenderAddress()
String
getSenderAddressDataFieldGuid()
SENDER_ADDRESS_TYPE
getSenderAddressType()
String
getSenderFallbackAddress()
SendMailWorkflowAction.Subject
getSubject()
String
getUriBody()
Path
getWorkflowDirectory()
Get the workflow directory.WorkflowTransition
process(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx, de.uplanet.lucy.server.IProcessingContext p_ctx)
Process a workflow event in the given context.void
setHeaders(Map<String,String> p_headers)
Set the email headers.void
setLanguage(String p_strLanguage)
Set the language.void
setMailType(MAIL_TYPE p_mailType)
Set the type of the email.void
setNoRecipientErrorMode(ON_ERROR_MODE p_onErrorMode)
This property determines if an exception should be thrown if the mail has no recipients.void
setProcessingContextSenderAddress(String p_strProcessingContextSenderAddress)
void
setRecipientsBcc(SendMailWorkflowAction.RecipientsBcc p_recipientsBcc)
Set the BCC recipients.void
setRecipientsCc(SendMailWorkflowAction.RecipientsCc p_recipientsCc)
Set the CC recipients.void
setRecipientsReplyTo(SendMailWorkflowAction.RecipientsReplyTo p_recipientsReplyTo)
Set the Reply-To recipients.void
setRecipientsTo(SendMailWorkflowAction.RecipientsTo p_recipientsTo)
Set the TO recipients.void
setSenderAddress(String p_strSenderAddress)
void
setSenderAddressDataFieldGuid(String p_strSenderAddressDataFieldGuid)
void
setSenderAddressType(SENDER_ADDRESS_TYPE p_senderType)
void
setSenderFallbackAddress(String p_strSenderFallbackAddress)
void
setSubject(SendMailWorkflowAction.Subject p_subject)
void
setUriBody(String p_strUri)
void
setWorkflowDirectory(Path p_dir)
Set the workflow directory.-
Methods inherited from class de.uplanet.lucy.server.workflow.action.AbstractWorkflowAction
getAfferentTransition, getEfferentTransition, getGuid, getName, getWorkflow, isActive, setActive, setAfferentTransition, setEfferentTransition, setName, setWorkflow, toString
-
-
-
-
Constructor Detail
-
SendMailWorkflowAction
public SendMailWorkflowAction(String p_strGuid)
Create a mail workflow action.- Parameters:
p_strGuid
- The GUID of the action
-
-
Method Detail
-
getWorkflowDirectory
public Path getWorkflowDirectory()
Description copied from interface:INeedWorkflowDirectory
Get the workflow directory.- Specified by:
getWorkflowDirectory
in interfaceINeedWorkflowDirectory
- Returns:
- The workflow directory.
-
setWorkflowDirectory
public void setWorkflowDirectory(Path p_dir)
Description copied from interface:INeedWorkflowDirectory
Set the workflow directory.- Specified by:
setWorkflowDirectory
in interfaceINeedWorkflowDirectory
- Parameters:
p_dir
- The workflow directory.
-
getRecipientsTo
public SendMailWorkflowAction.RecipientsTo getRecipientsTo()
Get the TO recipients.- Returns:
- The TO recipients.
-
setRecipientsTo
public void setRecipientsTo(SendMailWorkflowAction.RecipientsTo p_recipientsTo)
Set the TO recipients.- Parameters:
p_recipientsTo
- The TO recipients.
-
getRecipientsCc
public SendMailWorkflowAction.RecipientsCc getRecipientsCc()
Get the CC recipients.- Returns:
- The CC recipients.
-
setRecipientsCc
public void setRecipientsCc(SendMailWorkflowAction.RecipientsCc p_recipientsCc)
Set the CC recipients.- Parameters:
p_recipientsCc
- The CC recipients.
-
getRecipientsBcc
public SendMailWorkflowAction.RecipientsBcc getRecipientsBcc()
Get the BCC recipients.- Returns:
- The BCC recipients.
-
setRecipientsBcc
public void setRecipientsBcc(SendMailWorkflowAction.RecipientsBcc p_recipientsBcc)
Set the BCC recipients.- Parameters:
p_recipientsBcc
- The BCC recipients.
-
getRecipientsReplyTo
public SendMailWorkflowAction.RecipientsReplyTo getRecipientsReplyTo()
Get the Reply-To recipients.- Returns:
- The Reply-To recipients.
-
setRecipientsReplyTo
public void setRecipientsReplyTo(SendMailWorkflowAction.RecipientsReplyTo p_recipientsReplyTo)
Set the Reply-To recipients.- Parameters:
p_recipientsReplyTo
- The Reply-To recipients.
-
getNoRecipientErrorMode
public ON_ERROR_MODE getNoRecipientErrorMode()
This property determines if an exception should be thrown if the mail has no recipients.- Returns:
- The error handling mode.
-
setNoRecipientErrorMode
public void setNoRecipientErrorMode(ON_ERROR_MODE p_onErrorMode)
This property determines if an exception should be thrown if the mail has no recipients.- Parameters:
p_onErrorMode
- The error mode to be used. May be eitherON_ERROR_MODE.THROW_EXCEPTION
, orON_ERROR_MODE.NO_ACTION
.
-
getHeaders
public Map<String,String> getHeaders()
Get the email headers.- Returns:
- The email headers.
-
setHeaders
public void setHeaders(Map<String,String> p_headers)
Set the email headers.- Parameters:
p_headers
- The email headers.
-
getMailType
public MAIL_TYPE getMailType()
Get the type of the email.- Returns:
- Type of the email.
-
setMailType
public void setMailType(MAIL_TYPE p_mailType)
Set the type of the email.- Parameters:
p_mailType
- The type of the email.
-
getLanguage
public String getLanguage()
Get the language.This value can either be a language identifier, or a known context name.
- Returns:
- The language, or
null
if the default language is being used. - See Also:
VARIABLE_NAMESPACE.URN_REQUEST_PREFIX
,VARIABLE_NAMESPACE.URN_SESSION_PREFIX
,VARIABLE_NAMESPACE.URN_SHARED_STATE_PREFIX
,VARIABLE_NAMESPACE.URN_USER_PREFIX
,VARIABLE_NAMESPACE.URN_SYSTEM_DATA_GROUP_PREFIX
-
setLanguage
public void setLanguage(String p_strLanguage)
Set the language.This value can either be a language identifier, or a known context name.
-
getSubject
public SendMailWorkflowAction.Subject getSubject()
-
setSubject
public void setSubject(SendMailWorkflowAction.Subject p_subject)
-
getUriBody
public String getUriBody()
-
setUriBody
public void setUriBody(String p_strUri)
-
getSenderAddressType
public SENDER_ADDRESS_TYPE getSenderAddressType()
-
setSenderAddressType
public void setSenderAddressType(SENDER_ADDRESS_TYPE p_senderType)
-
getSenderAddress
public String getSenderAddress()
-
setSenderAddress
public void setSenderAddress(String p_strSenderAddress)
-
getProcessingContextSenderAddress
public String getProcessingContextSenderAddress()
-
setProcessingContextSenderAddress
public void setProcessingContextSenderAddress(String p_strProcessingContextSenderAddress)
-
getSenderAddressDataFieldGuid
public String getSenderAddressDataFieldGuid()
-
setSenderAddressDataFieldGuid
public void setSenderAddressDataFieldGuid(String p_strSenderAddressDataFieldGuid)
-
getSenderFallbackAddress
public String getSenderFallbackAddress()
-
setSenderFallbackAddress
public void setSenderFallbackAddress(String p_strSenderFallbackAddress)
-
process
public WorkflowTransition process(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx, de.uplanet.lucy.server.IProcessingContext p_ctx) throws Exception
Description copied from interface:IWorkflowAction
Process a workflow event in the given context.Normally, a workflow action should return its efferent transition, regardless whether it is
active
, or not.- Specified by:
process
in interfaceIWorkflowAction
- Parameters:
p_evt
- The event to be processed.p_wfCtx
- The workflow processing context.p_ctx
- The processing context.- Returns:
- The efferent transition, or
null
. - Throws:
InterruptedException
- If processing of this action has been interrupted.Exception
- If an error occurred.
-
-