Class RestComposer
java.lang.Object
com.aquima.interactions.communication.impl.evaluator.composer.RestComposer
Internal class to compose a rest message based on a soap service definition and a profile state.
- Since:
- 9.0
- Author:
- Arjan Pragt
-
Constructor Summary
ConstructorsConstructorDescriptionRestComposer
(IRestServiceDefinition definition, ICommunicationEngineHandler handler, IValueFormatter valueFormatter, IDomainSchemaRegistry schemaRegistry) Construct a rest composer with a definition and a handler for custom elements. -
Method Summary
Modifier and TypeMethodDescriptioncomposeRequest
(IProfile profile, String operationName, String mimeType) composeRequest
(IProfile profile, String operationName, String mimeType, Map<String, List<String>> headers) This method composes a rest request message.composeResponse
(IProfile profile, String operationName, String mimeType) This method composes a rest response message.
-
Constructor Details
-
RestComposer
public RestComposer(IRestServiceDefinition definition, ICommunicationEngineHandler handler, IValueFormatter valueFormatter, IDomainSchemaRegistry schemaRegistry) Construct a rest composer with a definition and a handler for custom elements.- Parameters:
definition
- The service definition, may not be null.handler
- The handler for custom elements, may not be null.valueFormatter
- The ValueFormatter to format the ISingleValue elements, may not be null
-
-
Method Details
-
composeRequest
public IRestRequestMessage composeRequest(IProfile profile, String operationName, String mimeType) throws MessageComposeException - Throws:
MessageComposeException
-
composeRequest
public IRestRequestMessage composeRequest(IProfile profile, String operationName, String mimeType, Map<String, List<String>> headers) throws MessageComposeExceptionThis method composes a rest request message.- Parameters:
profile
- The profile to use to compose the request message, may not be null.operationName
- The operation name, may not be null or empty.mimeType
- The desired mimetype of the request, or null for default.headers
- The map of headers that are put on the request- Returns:
- The composed rest message, never null.
- Throws:
MessageComposeException
-
composeResponse
public IRestMessage composeResponse(IProfile profile, String operationName, String mimeType) throws MessageComposeException This method composes a rest response message.- Parameters:
profile
- The profile to use to compose the response message, may not be null.operationName
- The operation name, may not be null or empty.mimeType
- The desired mimetype of the request, or null for default.- Returns:
- The composed rest message, never null.
- Throws:
MessageComposeException
-