Class RestRequestMessageTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.communication.RestMessageTemplate
com.aquima.interactions.test.templates.communication.RestRequestMessageTemplate
This class may be used to quickly initialize a model.
- Since:
- 9.0
- Author:
- Jon van Leuven, Arjan Pragt
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RestRequestMessageTemplate
(com.aquima.interactions.foundation.report.IInitializationReport initializationReport) -
Method Summary
Modifier and TypeMethodDescriptionaddConstantUrnArgument
(String name, String constant) This method adds a constant urn argument.addDynamicAttributeFragment
(String attribute) This method adds a dynamic urn fragment.addDynamicUrnArgument
(String name, String attribute) This method adds a dynamic urn argument.addDynamicUrnArgument
(String name, String attribute, boolean required) This method adds a dynamic urn argument.addUrnConstantFragment
(String constant) This method adds a constant urn fragment.protected com.aquima.interactions.foundation.connectivity.HttpMethodType
protected Iterator
<RestUrnArgumentTemplate> protected Iterator
<RestUrnFragmentTemplate> void
setHttpMethod
(com.aquima.interactions.foundation.connectivity.HttpMethodType method) This method sets the http method of the requestmessagecom.aquima.interactions.communication.ds.IRestMessageDS
This method converts the template to a data source that can be used to initialize the definition.Methods inherited from class com.aquima.interactions.test.templates.communication.RestMessageTemplate
addHeader, addValidation, getBodyAttributeName, getBodyElement, getBodySchema, getEntityName, getHeaders, getValidations, setBodyAttributeName, setBodyElement, setBodySchema, setEntity
Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
Constructor Details
-
RestRequestMessageTemplate
protected RestRequestMessageTemplate(com.aquima.interactions.foundation.report.IInitializationReport initializationReport)
-
-
Method Details
-
setHttpMethod
public void setHttpMethod(com.aquima.interactions.foundation.connectivity.HttpMethodType method) This method sets the http method of the requestmessage- Parameters:
method
- The http method, may not be null.
-
getMethod
protected com.aquima.interactions.foundation.connectivity.HttpMethodType getMethod() -
addUrnConstantFragment
This method adds a constant urn fragment.- Parameters:
constant
- Constant value of the urn, may not be null.- Returns:
- The created fragment template.
-
addDynamicAttributeFragment
This method adds a dynamic urn fragment.- Parameters:
attribute
- The name of the attribute representing the value, may not be null.- Returns:
- The created fragment template.
-
getUrnFragments
-
addConstantUrnArgument
This method adds a constant urn argument.- Parameters:
name
- The name of the argument, may not be null.constant
- The value attribute of the argument, may not be null.- Returns:
- The created argument template.
-
addDynamicUrnArgument
This method adds a dynamic urn argument.- Parameters:
name
- The name of the argument, may not be null.attribute
- The value attribute of the argument, may not be null.- Returns:
- The created argument template.
-
addDynamicUrnArgument
public RestUrnArgumentTemplate addDynamicUrnArgument(String name, String attribute, boolean required) This method adds a dynamic urn argument.- Parameters:
name
- The name of the argument, may not be null.attribute
- The value attribute of the argument, may not be null.required
- If the argument is required or not.- Returns:
- The created argument template.
-
getUrnArguments
-
toDataSource
public com.aquima.interactions.communication.ds.IRestMessageDS toDataSource()This method converts the template to a data source that can be used to initialize the definition.- Overrides:
toDataSource
in classRestMessageTemplate
- Returns:
- a data source that can be used to initialize the definition.
-