|
||||||||||
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.http.HttpPostPostStep
public class HttpPostPostStep
Post-processing step to HTTP Post the current workflow file or other files corresponding to a pattern.
The result of this step is a file containing each HTTP Post response, in the following structure:
<HTTPPosts> <HTTPPost filename="" url=""> <Request> <Headers> <Header name="" value=""/> ... </Headers> <Body> ... </Body> </Request> <Response status=""> <Headers> <Header name="" value=""/> ... </Headers> <Body> ... </Body> </Response> </HTTPPost> ... </HTTPPosts>Response status corresponds to HTTP status codes.
This file becomes current in the pipeline at the end of the step.
This step takes all parameters from its base class
BaseCustomStep
and the
following additional parameters:
WildcardFileFilter
in the file names
only. Pattern is case sensitive. If the pattern includes multiple files, they
will be processed in ascending name order. If absent, the current workflow
document is posted.retryInterval
between each attempt. It multiplies the last time
waited by this amount. For example. if retryInterval
is 10
seconds and the retry factor is 2, wait time will be successively 10, 20, 40
seconds and so on, until the maximum number of retries has been reached
(default: 1).This class is dependent on:
Here are two 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 | |
---|---|
HttpPostPostStep()
Constructor without arguments. |
Method Summary | |
---|---|
protected org.w3c.dom.Document |
doHttpPost(java.io.File file,
java.lang.String url)
HTTP Post the file. |
void |
execute(com.taleo.ws.integration.client.Pipeline pipeline)
|
java.lang.String |
getDescription()
|
java.lang.String |
getFilePattern()
Get the file pattern. |
java.lang.String |
getHeader(java.lang.String name)
Get the header by its name. |
java.lang.String |
getIdentifier()
|
java.lang.String |
getMoveFolder()
Get the move folder. |
java.lang.String |
getName()
|
int |
getNbRetries()
Get the number of retries. |
java.lang.String |
getPassword()
Get the HTTP password. |
int |
getRetryFactor()
Get the retry factor. |
int |
getRetryInterval()
Get the retry interval, in seconds. |
com.taleo.ws.integration.client.SupportedPipeline |
getSupportedPipeline()
|
java.lang.String |
getURL()
Get the URL. |
java.lang.String |
getUsername()
Get the HTTP username. |
org.w3c.dom.Document |
httpPost(java.io.File pattern)
HTTP Post the files corresponding to the file pattern. |
void |
init(com.taleo.ws.integration.client.GlobalConfig config)
|
void |
setFilePattern(java.lang.String filePattern)
Set the file pattern. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Set the header by its name. |
void |
setMoveFolder(java.lang.String moveFolder)
Set the move folder. |
void |
setNbRetries(int nbRetries)
Set the number of retries. |
void |
setPassword(java.lang.String password)
Set the HTTP password. |
void |
setRetryFactor(int retryFactor)
Set the retry factor. |
void |
setRetryInterval(int retryInterval)
Set the retry interval, in seconds. |
void |
setURL(java.lang.String url)
Set the URL. |
void |
setUsername(java.lang.String username)
Set the HTTP username. |
protected void |
validateParameterNames()
Validate the parameters names. |
Methods inherited from class com.taleo.integration.client.customstep.BaseCustomStep |
---|
createTempFile, createTempFile, getEncoding, getTempFolder, isActive, registerParameterName, setActive, setEncoding |
Methods inherited from class com.taleo.integration.client.step.BaseCustomStep |
---|
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 HttpPostPostStep()
Method Detail |
---|
protected void validateParameterNames()
Override the default method to allow for HTTP headers to be passed.
validateParameterNames
in class BaseCustomStep
public java.lang.String getURL()
public void setURL(java.lang.String url)
url
- public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- public java.lang.String getFilePattern()
public void setFilePattern(java.lang.String filePattern)
filePattern
- public java.lang.String getMoveFolder()
public void setMoveFolder(java.lang.String moveFolder)
moveFolder
- public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- public int getNbRetries()
public void setNbRetries(int nbRetries)
nbRetries
- public int getRetryInterval()
public void setRetryInterval(int retryInterval)
retryInterval
- public int getRetryFactor()
public void setRetryFactor(int retryFactor)
retryFactor
- public java.lang.String getHeader(java.lang.String name)
name
-
public void setHeader(java.lang.String name, java.lang.String value)
name
- value
- 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 com.taleo.ws.integration.client.SupportedPipeline getSupportedPipeline()
getSupportedPipeline
in interface com.taleo.integration.client.step.Step
getSupportedPipeline
in class com.taleo.integration.client.step.BaseCustomStep
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 org.w3c.dom.Document httpPost(java.io.File pattern) throws java.io.IOException
pattern
- The file pattern.
<HTTPPosts> <HTTPPost> ... </HTTPPost> ... </HTTPPosts>
java.io.IOException
protected org.w3c.dom.Document doHttpPost(java.io.File file, java.lang.String url) throws java.io.IOException
file
- The file to post.url
- The URL to post to.
<HTTPPost> ... </HTTPPost>
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |