Class RestMessageTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.communication.RestMessageTemplate
- Direct Known Subclasses:
RestRequestMessageTemplate
This class may be used to quickly initialize a model.
- Since:
- 9.0
- Author:
- Jon van Leuven, Arjan Pragt
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RestMessageTemplate
(com.aquima.interactions.foundation.report.IInitializationReport initializationReport) -
Method Summary
Modifier and TypeMethodDescriptionThis method adds a message header.addValidation
(String type) This method adds a validation to the body attribute.protected String
protected ElementReferenceTemplate
protected String
protected String
protected Iterator
<RestHeaderTemplate> protected Iterator
<FieldValidationTemplate> void
setBodyAttributeName
(String attributeName) This method sets the attribute for the element reference of the bodysetBodyElement
(com.aquima.interactions.foundation.connectivity.QualifiedName element) This method sets the element reference of the message body.void
setBodySchema
(String domainSchemaName) Sets the body domain schema.void
This method sets the entity name of the message.com.aquima.interactions.communication.ds.IRestMessageDS
Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
Constructor Details
-
RestMessageTemplate
protected RestMessageTemplate(com.aquima.interactions.foundation.report.IInitializationReport initializationReport)
-
-
Method Details
-
setEntity
This method sets the entity name of the message.- Parameters:
entityName
- The name of the entity, may not be null.
-
getEntityName
-
setBodyElement
public ElementReferenceTemplate setBodyElement(com.aquima.interactions.foundation.connectivity.QualifiedName element) This method sets the element reference of the message body.- Parameters:
element
- The qualifiedname of the element, may not be null.
-
getBodyElement
-
getBodySchema
-
setBodySchema
Sets the body domain schema.- Parameters:
domainSchemaName
- The name of the domain schema. *
-
getBodyAttributeName
-
setBodyAttributeName
This method sets the attribute for the element reference of the body- Parameters:
attributeName
- The name of the attribute
-
addValidation
This method adds a validation to the body attribute.- Parameters:
type
- The name of the validation.- Returns:
- The validation template.
-
getValidations
-
addHeader
This method adds a message header.- Parameters:
name
- The name of the header, may not be null.attributeName
- The name of the attribute, may not be null.- Returns:
- The template for the header.
-
getHeaders
-
toDataSource
public com.aquima.interactions.communication.ds.IRestMessageDS toDataSource()
-