Package de.xima.fc.workflow.model.nodes
Class FcHttpRequestProps
java.lang.Object
de.xima.fc.workflow.taglib.model.BaseActionProps
de.xima.fc.workflow.model.nodes.FcHttpRequestProps
- All Implemented Interfaces:
IDescriptionProviding,INameProviding,IAttachToFormRecordProviding,Serializable
@NotNullIf(field="basicAuthProps",dependants="useBasicAuth",target=FcHttpRequestProps.class) @NotNullIf(field="proxyProps",dependants="useProxy",target=FcHttpRequestProps.class) @NotNullIf(field="filesToTransmit",dependants={"httpVerb","httpRequestType"},target=FcHttpRequestProps.class) @NotNullIf(field="customBodyContent",dependants={"httpVerb","httpRequestType"},target=FcHttpRequestProps.class) @NotNullIf(field="useFieldAlias",dependants={"httpVerb","httpRequestType"},target=FcHttpRequestProps.class) @NotNullIf(field="requestParameters",dependants={"httpVerb","httpRequestType"},target=FcHttpRequestProps.class) @NotNullIf(field="sendAllFormValues",dependants={"httpVerb","httpRequestType"},target=FcHttpRequestProps.class) @NotNullIf(field="multipartHeaderType",dependants="httpRequestType",target=FcHttpRequestProps.class)
@NotEmptyIf(field="customLocationResolutionUri",
dependants="locationResolutionType",
target=FcHttpRequestProps.class)
@NonEmptySingleFileIf(field="singleFileToTransmit",
dependants={"httpVerb","httpRequestType"},
target=FcHttpRequestProps.class)
public final class FcHttpRequestProps
extends BaseActionProps
implements Serializable, IAttachToFormRecordProviding
Model class for the HTTP request workflow action (
EWorkflowNodeType.FC_POST_REQUEST).- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPOJO model class for the basic auth credentials of the HTTP request action.static interfaceCustom label for thegetConnectTimeout()property.static classPOJO model class for the credentials to use with the proxy of the HTTP request action (applicable only when a proxy is used).static classPOJO model class for the proxy configuration of the HTTP request action.static interfaceCustom label for thegetReadTimeout()property. -
Field Summary
Fields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTIONFields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the connection timeout for the HTTP request.Gets the file name to use for writing the content of the HTTP response to a file.Gets the read timeout for the HTTP request.booleanWhen connecting via HTTPS, whether to allow invalid certificates.booleanbooleanbooleanDeprecated.booleanDeprecated.booleanbooleanbooleanbooleanbooleanDeprecated.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetAllowInvalidCertificates(boolean allowInvalidCertificates) When connecting via HTTPS, sets whether to allow invalid certificate`s.voidsetAsResponsePage(boolean asResponsePage) voidsetAttachToFormRecord(boolean attachToFormRecord) voidsetBasicAuthProps(FcHttpRequestProps.BasicAuthProps basicAuthProps) voidsetConnectTimeout(TimeDuration connectTimeout) sets the connection timeout for the HTTP request.voidsetCustomBodyContent(String customBodyContent) voidsetCustomBodyContentType(EHttpContentType customBodyContentType) voidsetCustomLocationResolutionUri(String customLocationResolutionUri) voidsetDisallowMessageBody(boolean disallowMessageBody) Deprecated.voidsetFilesToTransmit(MultiFile filesToTransmit) voidsetForceMultipart(boolean forceMultipart) Deprecated.voidsetHeaderParameters(List<Setting<String>> headerParameters) voidsetHttpRequestType(EHttpRequestType httpRequestType) voidsetHttpVerb(String httpVerb) voidsetInputCharset(String inputCharset) voidsetLocationResolutionType(EHttpLocationResolutionType locationResolutionType) voidsetMultipartHeaderType(EMultipartHeaderType multipartHeaderType) voidsetOutputCharset(String outputCharset) voidsetOutputFileName(String outputFileName) Sets the file name to use for writing the content of the HTTP response to a file.voidsetPostUrl(String postUrl) voidsetProxyProps(FcHttpRequestProps.ProxyProps proxyProps) voidsetReadTimeout(TimeDuration readTimeout) sets the read timeout for the HTTP request.voidsetRequestParameters(List<Setting<String>> requestParameters) voidsetSendAllFormValues(boolean sendAllFormValues) voidsetSingleFileToTransmit(SingleFile singleFileToTransmit) voidsetTreat4xxAsNormal(boolean treat4xxAsNormal) voidsetTreat5xxAsNormal(boolean treat5xxAsNormal) voidsetUseBasicAuth(boolean useBasicAuth) voidsetUseFieldAlias(boolean useFieldAlias) voidsetUseProxy(boolean useProxy) voidsetXslTemplate(UuidEntityRef xslTemplate) Methods inherited from class de.xima.fc.workflow.taglib.model.BaseActionProps
getBeschreibung, getColor, getDescription, getIcon, getName, setColor, setDescription, setIcon, setName
-
Constructor Details
-
FcHttpRequestProps
public FcHttpRequestProps()
-
-
Method Details
-
getBasicAuthProps
- Returns:
- Basic authentication settings when enabled for the request, see
isUseBasicAuth().
-
getConnectTimeout
Gets the connection timeout for the HTTP request. The connection timeout is the maximum number of time to wait when attempting to establish a connection to the server.- Returns:
- The connect timeout.
- Since:
- 8.1.0
-
getCustomBodyContent
- Returns:
- The custom body content
-
getCustomBodyContentType
- Returns:
- The custom body content type
-
getCustomLocationResolutionUri
- Returns:
- When the
resolution typefor theLocationheader is set toRESOLVE_AGAINST_CUSTOM_URI: the custom URI against which to resolve the URI from theLocationheader.
-
getFilesToTransmit
- Returns:
- Files to transmit with the HTTP request (requires a multipart request, see
isForceMultipart()).
-
getHeaderParameters
- Returns:
- Headers to send with the HTTP request.
-
getHttpRequestType
- Returns:
- How the body of the HTTP request should be created.
-
getHttpVerb
- Returns:
- The HTTP verb to use for the HTTP request.
-
getInputCharset
- Returns:
- Input character set, i.e. the encoding used for sending the HTTP request.
-
getLocationResolutionType
- Returns:
- When the HTTP response has a 3xx status code with a
Locationheader, how to resolve the URI in that header. Defaults toRESOLVE_AGAINST_REQUEST_URIaccording to RFC 7231.
-
getMultipartHeaderType
- Returns:
- How to handle Unicode characters in headers of multipart HTTP requests.
-
getOutputCharset
- Returns:
- Output character set, e.g. the expected encoding of the response.
-
getOutputFileName
Gets the file name to use for writing the content of the HTTP response to a file. May contain placeholders. When empty, the file name is determined automatically, either from the response headers or from the request URL.- Returns:
- The file name of the file with HTTP response.
-
getPostUrl
- Returns:
- URL to which to direct the HTTP request.
-
getProxyProps
- Returns:
- Proxy settings when a proxy is used for the request, see
isUseProxy().
-
getReadTimeout
Gets the read timeout for the HTTP request. The read timeout is the maximum number of time to wait for a response from the server after a connection has been established.- Returns:
- The read timeout.
- Since:
- 8.1.0
-
getRequestParameters
- Returns:
- Additional form parameters to send with the HTTP request.
-
getSingleFileToTransmit
- Returns:
- The
SingleFileto transmit as body content
-
getXslTemplate
- Returns:
- Optional XSL template for transforming the received response.
-
isAllowInvalidCertificates
public boolean isAllowInvalidCertificates()When connecting via HTTPS, whether to allow invalid certificates.- Returns:
trueif invalid certificates are allowed,falseotherwise.
-
isAsResponsePage
public boolean isAsResponsePage()- Returns:
- If
true, returns the response from the HTTP request as the workflow response. That is, when the user submits a form and the workflow is triggered, send the response back to the user.
-
isAttachToFormRecord
public boolean isAttachToFormRecord()- Specified by:
isAttachToFormRecordin interfaceIAttachToFormRecordProviding- Returns:
- Whether files created by the workflow node are attached to the form record.
-
isDisallowMessageBody
Deprecated.usegetHttpRequestType()withEHttpRequestType.URL- Returns:
- When a custom
getHttpVerb()is selected, whether a message body is allowed. If no message body is allowed, parameters will be added as URL parameters and no files will be sent.
-
isForceMultipart
Deprecated.- Returns:
trueif the body type isEHttpRequestType.MULTIPART,falseotherwise
-
isSendAllFormValues
public boolean isSendAllFormValues()- Returns:
- Whether to send the values of all form fields as form parameters with the HTTP request.
-
isShowBasicAuthProps
public boolean isShowBasicAuthProps()- Returns:
- Whether the user can configure the basic authentication settings in the UI.
-
isShowCustomBodyContent
public boolean isShowCustomBodyContent()- Returns:
- Whether to show the UI for selecting a custom body content (custom text file or binary file).
-
isShowCustomLocationResolutionUri
public boolean isShowCustomLocationResolutionUri()- Returns:
- Whether to show the UI with the input for the custom URI for resolving the
Locationheader should be shown. See alsogetCustomLocationResolutionUri().
-
isShowDisallowMessageBody
Deprecated.- Returns:
- Whether the user can configure the body message setting in the UI.
-
isShowFilesToTransmit
public boolean isShowFilesToTransmit()- Returns:
- Whether the user can configure the files to transmit setting in the UI.
-
isShowHttpRequestTypeSelection
public boolean isShowHttpRequestTypeSelection()- Returns:
- Whether to show the UI for selecting the type of body content for the request.
-
isShowMultipartHeaderTypeSelection
public boolean isShowMultipartHeaderTypeSelection()- Returns:
- Whether to show the UI for selecting the multipart header type.
-
isShowProxyProps
public boolean isShowProxyProps()- Returns:
- Whether the user can configure the proxy settings in the UI.
-
isShowRequestParameters
public boolean isShowRequestParameters()- Returns:
- Whether to show the UI for entering custom key value pairs that are included in the request.
-
isShowSendAllFormValues
public boolean isShowSendAllFormValues()- Returns:
- Whether to show the UI with the checkbox for including all submitted form field data in the request.
-
isShowSingleFileToTransmit
public boolean isShowSingleFileToTransmit()- Returns:
- Whether to show the UI for selecting a binary file to use as the HTTP request body.
-
isShowUseFieldAlias
public boolean isShowUseFieldAlias()- Returns:
- Whether to show the UI with the checkbox to use the alias of form fields instead of their names, see also
isSendAllFormValues().
-
isTreat4xxAsNormal
public boolean isTreat4xxAsNormal()- Returns:
- When
true, treats responses with 4xx status codes as normal. Whenfalse, throws an error instead (the default behavior).
-
isTreat5xxAsNormal
public boolean isTreat5xxAsNormal()- Returns:
- When
true, treats responses with 5xx status codes as normal. Whenfalse, throws an error instead (the default behavior).
-
isUseBasicAuth
public boolean isUseBasicAuth()- Returns:
- Whether to use basic authentication via a username and password.
-
isUseFieldAlias
public boolean isUseFieldAlias()- Returns:
- When
true, uses the alias of a form element instead of its name.
-
isUseProxy
public boolean isUseProxy()- Returns:
- Whether to use a proxy when sending the HTTP request.
-
setAllowInvalidCertificates
public void setAllowInvalidCertificates(boolean allowInvalidCertificates) When connecting via HTTPS, sets whether to allow invalid certificate`s.- Parameters:
allowInvalidCertificates-trueif invalid certificates are allowed,falseotherwise.
-
setAsResponsePage
public void setAsResponsePage(boolean asResponsePage) - Parameters:
asResponsePage- Iftrue, returns the response from the HTTP request as the workflow response. That is, when the user submits a form and the workflow is triggered, send the response back to the user.
-
setAttachToFormRecord
public void setAttachToFormRecord(boolean attachToFormRecord) - Parameters:
attachToFormRecord- Whether files created by the workflow node are attached to the form record.
-
setBasicAuthProps
- Parameters:
basicAuthProps- Basic authentication settings when enabled for the request, seeisUseBasicAuth().
-
setConnectTimeout
sets the connection timeout for the HTTP request. The connection timeout is the maximum number of time to wait when attempting to establish a connection to the server.- Parameters:
connectTimeout- The connect timeout.- Since:
- 8.1.0
-
setCustomBodyContent
- Parameters:
customBodyContent- The custom body content to set
-
setCustomBodyContentType
- Parameters:
customBodyContentType- The custom body content type to set
-
setCustomLocationResolutionUri
- Parameters:
customLocationResolutionUri- When theresolution typefor theLocationheader is set toRESOLVE_AGAINST_CUSTOM_URI: the custom URI against which to resolve the URI from theLocationheader.
-
setDisallowMessageBody
Deprecated.- Parameters:
disallowMessageBody- When a customgetHttpVerb()is selected, whether a message body is allowed. If no message body is allowed, parameters will be added as URL parameters and no files will be sent.
-
setFilesToTransmit
- Parameters:
filesToTransmit- Files to transmit with the HTTP request.
-
setForceMultipart
Deprecated.- Parameters:
forceMultipart- if the body type should be set toEHttpRequestType.MULTIPARTorEHttpRequestType.DYNAMIC
-
setHeaderParameters
- Parameters:
headerParameters- Headers to send with the HTTP request. Replaces all headers that were set on this instance.
-
setHttpRequestType
- Parameters:
httpRequestType- How the body of the HTTP request should be created.
-
setHttpVerb
- Parameters:
httpVerb- The HTTP verb to use for the HTTP request.
-
setInputCharset
- Parameters:
inputCharset- Input character set, i.e. the encoding used for sending the HTTP request.
-
setLocationResolutionType
- Parameters:
locationResolutionType- When the HTTP response has a 3xx status code with aLocationheader, how to resolve the URI in that header. Defaults toRESOLVE_AGAINST_REQUEST_URIaccording to RFC 7231.
-
setMultipartHeaderType
- Parameters:
multipartHeaderType- How to handle Unicode characters in headers of multipart HTTP requests.
-
setOutputCharset
- Parameters:
outputCharset- Output character set, e.g. the expected encoding of the response.
-
setOutputFileName
Sets the file name to use for writing the content of the HTTP response to a file. May contain placeholders. When empty, the file name is determined automatically, either from the response headers or from the request URL.- Parameters:
outputFileName- The file name of the file with HTTP response.
-
setPostUrl
- Parameters:
postUrl- URL to which to direct the HTTP request.
-
setProxyProps
- Parameters:
proxyProps- Proxy settings when a proxy is used for the request, seeisUseProxy().
-
setReadTimeout
sets the read timeout for the HTTP request. The read timeout is the maximum number of time to wait for a response from the server after a connection has been established.- Parameters:
readTimeout- The read timeout.- Since:
- 8.1.0
-
setRequestParameters
- Parameters:
requestParameters- Additional form parameters to send with the HTTP request. Replaces existing parameters set on this instance.
-
setSendAllFormValues
public void setSendAllFormValues(boolean sendAllFormValues) - Parameters:
sendAllFormValues- Whether to send the values of all form fields as form parameters with the HTTP request.
-
setSingleFileToTransmit
- Parameters:
singleFileToTransmit- TheSingleFileto transmit the body content of
-
setTreat4xxAsNormal
public void setTreat4xxAsNormal(boolean treat4xxAsNormal) - Parameters:
treat4xxAsNormal- Whentrue, treats responses with 4xx status codes as normal. Whenfalse, throws an error instead (the default behavior).
-
setTreat5xxAsNormal
public void setTreat5xxAsNormal(boolean treat5xxAsNormal) - Parameters:
treat5xxAsNormal- Whentrue, treats responses with 5xx status codes as normal. Whenfalse, throws an error instead (the default behavior).
-
setUseBasicAuth
public void setUseBasicAuth(boolean useBasicAuth) - Parameters:
useBasicAuth- Whether to use basic authentication via a username and password.
-
setUseFieldAlias
public void setUseFieldAlias(boolean useFieldAlias) - Parameters:
useFieldAlias- Whentrue, uses the alias of a form element instead of its name.
-
setUseProxy
public void setUseProxy(boolean useProxy) - Parameters:
useProxy- Whether to use a proxy when sending the HTTP request.
-
setXslTemplate
- Parameters:
xslTemplate- Optional XSL template for transforming the received response.
-
getHttpRequestType()withEHttpRequestType.URL