Class SendMailWorkflowAction
java.lang.Object
de.uplanet.lucy.server.workflow.action.AbstractWorkflowAction
de.uplanet.lucy.server.workflow.action.SendMailWorkflowAction
- All Implemented Interfaces:
IActivatableWorkflowObject
,ILogLevelAware
,INamedWorkflowObject
,INeedWorkflow
,INeedWorkflowDirectory
,IWorkflowAction
,IWorkflowObject
,Serializable
public final class SendMailWorkflowAction
extends AbstractWorkflowAction
implements INeedWorkflowDirectory, ILogLevelAware
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static final class
static final class
static final class
static final class
static final class
Configuration of the email subject. -
Field Summary
Fields inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject
GUID_COMPARATOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the email headers.Get the language.Get the type of the email.This property determines if an exception should be thrown if the mail has no recipients.Get the BCC recipients.Get the CC recipients.Get the Reply-To recipients.Get the TO recipients.Get the workflow directory.boolean
This flag determines if verbose logging is turned on or off.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
setLogVerbose
(boolean p_bLogVerbose) This flag determines if verbose logging is turned on or off.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 Details
-
SendMailWorkflowAction
Create a mail workflow action.- Parameters:
p_strGuid
- The GUID of the action
-
-
Method Details
-
getWorkflowDirectory
Description copied from interface:INeedWorkflowDirectory
Get the workflow directory.- Specified by:
getWorkflowDirectory
in interfaceINeedWorkflowDirectory
- Returns:
- The workflow directory.
-
setWorkflowDirectory
Description copied from interface:INeedWorkflowDirectory
Set the workflow directory.- Specified by:
setWorkflowDirectory
in interfaceINeedWorkflowDirectory
- Parameters:
p_dir
- The workflow directory.
-
getRecipientsTo
Get the TO recipients.- Returns:
- The TO recipients.
-
setRecipientsTo
Set the TO recipients.- Parameters:
p_recipientsTo
- The TO recipients.
-
getRecipientsCc
Get the CC recipients.- Returns:
- The CC recipients.
-
setRecipientsCc
Set the CC recipients.- Parameters:
p_recipientsCc
- The CC recipients.
-
getRecipientsBcc
Get the BCC recipients.- Returns:
- The BCC recipients.
-
setRecipientsBcc
Set the BCC recipients.- Parameters:
p_recipientsBcc
- The BCC recipients.
-
getRecipientsReplyTo
Get the Reply-To recipients.- Returns:
- The Reply-To recipients.
-
setRecipientsReplyTo
Set the Reply-To recipients.- Parameters:
p_recipientsReplyTo
- The Reply-To recipients.
-
getNoRecipientErrorMode
This property determines if an exception should be thrown if the mail has no recipients.- Returns:
- The error handling mode.
-
setNoRecipientErrorMode
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
Get the email headers.- Returns:
- The email headers.
-
isLogVerbose
public boolean isLogVerbose()Description copied from interface:ILogLevelAware
This flag determines if verbose logging is turned on or off.- Specified by:
isLogVerbose
in interfaceILogLevelAware
- Returns:
true
if logging is verbose, orfalse
otherwise.
-
setLogVerbose
public void setLogVerbose(boolean p_bLogVerbose) Description copied from interface:ILogLevelAware
This flag determines if verbose logging is turned on or off.- Specified by:
setLogVerbose
in interfaceILogLevelAware
- Parameters:
p_bLogVerbose
-true
if logging should be verbose, orfalse
otherwise.
-
setHeaders
Set the email headers.- Parameters:
p_headers
- The email headers.
-
getMailType
Get the type of the email.- Returns:
- Type of the email.
-
setMailType
Set the type of the email.- Parameters:
p_mailType
- The type of the email.
-
getLanguage
Get the language.This value can either be a language identifier, or a known context name.
If this value is not set, the
ContextLanguage
will be used.- Returns:
- The language, or
null
if the default language is being used. - See Also:
-
setLanguage
Set the language.This value can either be a language identifier, or a known context name.
If this value is not set, the
ContextLanguage
will be used.- See Also:
-
getSubject
-
setSubject
-
getUriBody
-
setUriBody
-
getSenderAddressType
-
setSenderAddressType
-
getSenderAddress
-
setSenderAddress
-
getProcessingContextSenderAddress
-
setProcessingContextSenderAddress
-
getSenderAddressDataFieldGuid
-
setSenderAddressDataFieldGuid
-
getSenderFallbackAddress
-
setSenderFallbackAddress
-
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:
Exception
- If an error occurred.
-