|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taleo.integration.client.step.BaseStep
com.taleo.integration.client.step.BaseCustomStep
com.taleo.integration.client.customstep.BaseCustomStep
com.taleo.integration.client.customstep.mail.SendEmailPostStep
public class SendEmailPostStep
Post-processing step to send the current workflow file by email.
This step takes all parameters from its base class
BaseCustomStep
and the
following additional parameters:
true
or false
, default:
true
).true
. If absent, the original filename from
the response will be used. If there is none, the step will fail.messageTemplateFile
if the template is very short. If both are
present, this one has priority.text/plain
or text/html
). Other Mime types have not
been tested. Default: text/plain
The following additional parameters are required in the case of an import integration if the extra counters (success, create, update, delete, error) are to be used in the message template.
true
or false
, default: false
).The following variables are made available to build the email template and triggering rule:
DateTool
) to access various date
functions.MathTool
) to access various
mathematical functions.StringTool
) to
access various string functions.CsvExportFileTool
)
to access CSV export file properties and content.XmlExportFileTool
)
to access XML export file properties and content. CsvImportFileTool
)
to access CSV import file properties and content. WorkflowTool
) to
access various workflow variables.Example uses of these variables in the templates:
For import results, there is also:
For triggering rule, the $logic variable (
LogicTool
) may be
used:
There are also other Velocity constructs that can be used. For reference, see Velocity User Guide.
This class is dependent on:
Here are some examples of how to define this custom step in the TCC configuration file:
Field Summary |
---|
Fields inherited from class com.taleo.integration.client.customstep.BaseCustomStep |
---|
parameterNames |
Fields inherited from class com.taleo.integration.client.step.BaseCustomStep |
---|
parameters |
Fields inherited from class com.taleo.integration.client.step.BaseStep |
---|
commType, ERROR_NULL_GLOBAL_CONFIG, ERROR_NULL_PIPELINE, ERROR_NULL_STEP_CONFIG, productCode, tempFolder, type, version |
Constructor Summary | |
---|---|
SendEmailPostStep()
Constructor without arguments. |
Method Summary | |
---|---|
protected org.apache.velocity.VelocityContext |
buildVelocityContext(com.taleo.ws.integration.client.MessageFormat.Enum requestFormat,
com.taleo.ws.integration.client.MessageFormat.Enum responseFormat,
java.io.File file,
com.taleo.ws.integration.client.Pipeline pipeline,
com.taleo.ws.integration.client.GlobalConfig config)
Build the Velocity context to render templates and triggering rule. |
protected boolean |
evaluateTriggeringRule(org.apache.velocity.VelocityContext context)
Evaluate the triggering rule. |
void |
execute(com.taleo.ws.integration.client.Pipeline pipeline)
|
void |
execute(java.lang.String message,
java.io.File file,
java.lang.String filename)
Execute the step. |
java.lang.String |
getCc()
|
char |
getCsvDelimiter()
|
char |
getCsvQuoteCharacter()
|
java.lang.String |
getDescription()
|
java.lang.String |
getFilename()
Get the filename. |
java.lang.String |
getFrom()
|
java.lang.String |
getIdentifier()
|
java.lang.String |
getMessageTemplate()
|
java.lang.String |
getMessageTemplateFile()
|
java.lang.String |
getMimeType()
Get the Mime type of the email. |
java.lang.String |
getName()
|
int |
getPort()
|
java.lang.String |
getSmtpHost()
|
java.lang.String |
getSubject()
|
java.lang.String |
getTo()
|
java.lang.String |
getTriggeringRule()
Get the triggering rule. |
void |
init(com.taleo.ws.integration.client.GlobalConfig config)
|
boolean |
isCsvHeaderPresent()
|
boolean |
isFailOnError()
Get the FailOnError flag. |
boolean |
isSendAttachment()
|
protected java.lang.String |
prepareMessage(org.apache.velocity.VelocityContext context)
Prepare the email message body from the message template. |
void |
setCc(java.lang.String cc)
|
void |
setCsvDelimiter(char csvDelimiter)
|
void |
setCsvHeaderPresent(boolean csvHeaderPresent)
|
void |
setCsvQuoteCharacter(char csvQuoteCharacter)
|
void |
setFailOnError(boolean failOnError)
Set the FailOnError flag. |
void |
setFilename(java.lang.String filename)
Set the filename. |
void |
setFrom(java.lang.String from)
|
void |
setMessageTemplate(java.lang.String messageTemplate)
|
void |
setMessageTemplateFile(java.lang.String messageTemplateFile)
|
void |
setMimeType(java.lang.String mimeType)
Set the Mime type os the email. |
void |
setPort(int port)
|
void |
setSendAttachment(boolean sendAttachment)
|
void |
setSmtpHost(java.lang.String smtpHost)
|
void |
setSubject(java.lang.String subject)
|
void |
setTo(java.lang.String to)
|
void |
setTriggeringRule(java.lang.String triggeringRule)
Set the triggering rule. |
Methods inherited from class com.taleo.integration.client.customstep.BaseCustomStep |
---|
createTempFile, createTempFile, getEncoding, getTempFolder, isActive, registerParameterName, setActive, setEncoding, validateParameterNames |
Methods inherited from class com.taleo.integration.client.step.BaseCustomStep |
---|
getSupportedPipeline, getType, init |
Methods inherited from class com.taleo.integration.client.step.BaseStep |
---|
getAllProcessSupportPipeline, getCurrentFile, getCurrentFile, getCurrentMessage, getPostProcessSupportPipeline, getPreProcessSupportPipeline, isOriginalFile, validateLastStepType, validateMessageType, validatePipeline |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.taleo.integration.client.step.Step |
---|
validatePipeline |
Constructor Detail |
---|
public SendEmailPostStep()
Method Detail |
---|
public java.lang.String getIdentifier()
getIdentifier
in interface com.taleo.integration.client.step.CustomStep
getIdentifier
in interface com.taleo.integration.client.step.Step
getIdentifier
in class com.taleo.integration.client.step.BaseCustomStep
public java.lang.String getDescription()
getDescription
in interface com.taleo.integration.client.step.CustomStep
getDescription
in interface com.taleo.integration.client.step.Step
getDescription
in class com.taleo.integration.client.step.BaseCustomStep
public java.lang.String getName()
getName
in interface com.taleo.integration.client.step.CustomStep
getName
in interface com.taleo.integration.client.step.Step
getName
in class com.taleo.integration.client.step.BaseCustomStep
public java.lang.String getCc()
public void setCc(java.lang.String cc)
cc
- public java.lang.String getFrom()
public void setFrom(java.lang.String from)
from
- public int getPort()
public void setPort(int port)
port
- public boolean isSendAttachment()
public void setSendAttachment(boolean sendAttachment)
sendAttachment
- public java.lang.String getFilename()
public void setFilename(java.lang.String filename)
filename
- public java.lang.String getSmtpHost()
public void setSmtpHost(java.lang.String smtpHost)
smtpHost
- public java.lang.String getSubject()
public void setSubject(java.lang.String subject)
subject
- public java.lang.String getMessageTemplateFile()
public void setMessageTemplateFile(java.lang.String messageTemplateFile)
messageTemplateFile
- public java.lang.String getMessageTemplate()
public void setMessageTemplate(java.lang.String messageTemplate)
messageTemplate
- public java.lang.String getMimeType()
public void setMimeType(java.lang.String mimeType)
mimeType
- public java.lang.String getTo()
public void setTo(java.lang.String to)
to
- public boolean isCsvHeaderPresent()
public void setCsvHeaderPresent(boolean csvHeaderPresent)
csvHeaderPresent
- public char getCsvDelimiter()
public void setCsvDelimiter(char csvDelimiter)
csvDelimiter
- public char getCsvQuoteCharacter()
public void setCsvQuoteCharacter(char csvQuoteCharacter)
csvQuoteCharacter
- public boolean isFailOnError()
public void setFailOnError(boolean failOnError)
failOnError
- public java.lang.String getTriggeringRule()
public void setTriggeringRule(java.lang.String triggeringRule)
triggeringRule
- public void init(com.taleo.ws.integration.client.GlobalConfig config)
init
in class BaseCustomStep
public void execute(com.taleo.ws.integration.client.Pipeline pipeline) throws com.taleo.integration.client.step.StepException
com.taleo.integration.client.step.StepException
public void execute(java.lang.String message, java.io.File file, java.lang.String filename) throws javax.mail.MessagingException
message
- The email message.file
- The import or export results file.filename
- The target filename for the attachment.
javax.mail.MessagingException
protected boolean evaluateTriggeringRule(org.apache.velocity.VelocityContext context)
context
- The Velocity context.
true
or false
protected java.lang.String prepareMessage(org.apache.velocity.VelocityContext context)
context
- The Velocity context.
protected org.apache.velocity.VelocityContext buildVelocityContext(com.taleo.ws.integration.client.MessageFormat.Enum requestFormat, com.taleo.ws.integration.client.MessageFormat.Enum responseFormat, java.io.File file, com.taleo.ws.integration.client.Pipeline pipeline, com.taleo.ws.integration.client.GlobalConfig config)
requestFormat
- The request file format.responseFormat
- The response file format.file
- The import or export results file.pipeline
- The workflow pipeline.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |