Class CommunicationEngine
java.lang.Object
com.aquima.interactions.portal.model.session.CommunicationEngine
- All Implemented Interfaces:
ICommunicationEngine
Communication engine implementation that is exposed in the portal context. It delegates to the engine of the
communication component with the current portal state.
- Since:
- 9.0
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CommunicationEngine
(ICommunicationEngine communicationEngine, IInternalPortalContext context) -
Method Summary
Modifier and TypeMethodDescriptioncomposeRestRequest
(String serviceName, String operationName, String mimeType) This method composes the rest message using the current portal state.composeRestRequest
(String serviceName, String operationName, String mimeType, Map<String, List<String>> headers) composeRestResponse
(String serviceName, String operationName, String mimeType) This method composes a rest response message using the current portal state.composeSoapRequest
(String serviceName, String operationName) This methods composes a soap request message using the current portal state.composeSoapRequest
(String soapServiceName, String soapOperationName, ISoapMessageHandler[] soapHandlers) This methods composes a soap request message using the current portal state.composeSoapResponse
(String serviceName, String operationName) This method composes a soap response message using the current portal state.getRestService
(String serviceName) This method returns the rest service.String[]
This method returns the available rest service name.getSchemaSet
(String name) This method return the definition of a xsd type for the specified name.String[]
This method returns the available xsd type names.getSoapMessageHandlers
(String serviceCallName) This method returns the soap message handlers for the specified service call.getSoapService
(String serviceName) This method return the definition of a service for the specified name.String[]
This method returns the available service name.matchOperation
(IRestRequestMessage request, String serviceName) This method matches the urn of a request to an operation of the service.void
parseRestRequest
(IRestRequestMessage request, String serviceName, String operationName) This method parses a rest request message using the current portal state.void
parseRestResponse
(IRestMessage response, String serviceName, String operationName) This method parses a rest response message using the current portal state.void
parseSoapRequest
(ISoapMessage message, String serviceName, String operationName) This method parses a soap request message using the current portal state.void
parseSoapResponse
(ISoapMessage message, String serviceName, String operationName) This method parses a soap response message using the current portal state.void
validateRestMessage
(IRestServiceConfiguration configuration, IRestMessageDefinition message, String xml) This method may be used to validate a rest message using the current portal state.void
validateSoapMessage
(ISoapServiceConfiguration configuration, ISoapMessageDefinition message, String xml) This method may be used to validate a soap message using the current portal state.
-
Constructor Details
-
CommunicationEngine
protected CommunicationEngine(ICommunicationEngine communicationEngine, IInternalPortalContext context)
-
-
Method Details
-
getRestService
Description copied from interface:ICommunicationEngine
This method returns the rest service.- Specified by:
getRestService
in interfaceICommunicationEngine
- Parameters:
serviceName
- The name of the service, may not be null.- Returns:
- The definition of the service.
-
getRestServiceNames
Description copied from interface:ICommunicationEngine
This method returns the available rest service name.- Specified by:
getRestServiceNames
in interfaceICommunicationEngine
- Returns:
- The names of the rest services that are available, never null, but may be an empty array.
-
getSoapServiceNames
Description copied from interface:ICommunicationEngine
This method returns the available service name.- Specified by:
getSoapServiceNames
in interfaceICommunicationEngine
- Returns:
- The names of the services that are available, never null, but may be an empty array.
-
getSoapService
Description copied from interface:ICommunicationEngine
This method return the definition of a service for the specified name.- Specified by:
getSoapService
in interfaceICommunicationEngine
- Parameters:
serviceName
- The name of the service that is requested (case insensitive)- Returns:
- The service definition, never null
-
getSchemaSetNames
Description copied from interface:ICommunicationEngine
This method returns the available xsd type names.- Specified by:
getSchemaSetNames
in interfaceICommunicationEngine
- Returns:
- The names of the xsd types that are available, never null, but may be an empty array.
-
getSchemaSet
Description copied from interface:ICommunicationEngine
This method return the definition of a xsd type for the specified name.- Specified by:
getSchemaSet
in interfaceICommunicationEngine
- Parameters:
name
- The name of the xsd type that is requested (case insensitive)- Returns:
- The xsd type definition, never null
-
getSoapMessageHandlers
Description copied from interface:ICommunicationEngine
This method returns the soap message handlers for the specified service call.- Specified by:
getSoapMessageHandlers
in interfaceICommunicationEngine
- Parameters:
serviceCallName
- the service call for which the soap message- Returns:
- an array of soap message handlers, never null
-
composeRestRequest
public IRestRequestMessage composeRestRequest(String serviceName, String operationName, String mimeType) Description copied from interface:ICommunicationEngine
This method composes the rest message using the current portal state.- Specified by:
composeRestRequest
in interfaceICommunicationEngine
- Parameters:
serviceName
- The name of the rest service, may not be null or empty.operationName
- The name of the operation, may not be null or empty.- Returns:
- The composed message, never null.
-
composeRestRequest
public IRestRequestMessage composeRestRequest(String serviceName, String operationName, String mimeType, Map<String, List<String>> headers) - Specified by:
composeRestRequest
in interfaceICommunicationEngine
- Parameters:
serviceName
- The name of the rest service, may not be null or empty.operationName
- The name of the operation, may not be null or empty.mimeType
- The desired mimetype of the request.headers
- The headers that will be put on the request- Returns:
- The composed message, never null.
-
matchOperation
Description copied from interface:ICommunicationEngine
This method matches the urn of a request to an operation of the service.- Specified by:
matchOperation
in interfaceICommunicationEngine
- Parameters:
request
- The incoming rest request message.serviceName
- The name of the rest service, may not be null or empty.- Returns:
- The definition of the operation.
-
parseRestRequest
Description copied from interface:ICommunicationEngine
This method parses a rest request message using the current portal state.- Specified by:
parseRestRequest
in interfaceICommunicationEngine
- Parameters:
request
- The message to parse, may not be null.serviceName
- The name of the rest service, may not be null or empty.operationName
- The name of the operation, may not be null or empty.
-
composeRestResponse
Description copied from interface:ICommunicationEngine
This method composes a rest response message using the current portal state.- Specified by:
composeRestResponse
in interfaceICommunicationEngine
- Parameters:
serviceName
- The name of the rest service, may not be null or empty.operationName
- The name of the operation, may not be null or empty.- Returns:
- The composed response message, never null.
-
parseRestResponse
Description copied from interface:ICommunicationEngine
This method parses a rest response message using the current portal state.- Specified by:
parseRestResponse
in interfaceICommunicationEngine
- Parameters:
response
- The response message to parse.serviceName
- The name of the rest service, may not be null or empty.operationName
- The name of the operation, may not be null or empty.
-
composeSoapRequest
Description copied from interface:ICommunicationEngine
This methods composes a soap request message using the current portal state.- Specified by:
composeSoapRequest
in interfaceICommunicationEngine
- Parameters:
serviceName
- The name of the soap service, may not be null or empty.operationName
- The name of the operation, may not be null or empty.- Returns:
- The composed soap message, never null.
-
composeSoapRequest
public ISoapMessage composeSoapRequest(String soapServiceName, String soapOperationName, ISoapMessageHandler[] soapHandlers) Description copied from interface:ICommunicationEngine
This methods composes a soap request message using the current portal state.- Specified by:
composeSoapRequest
in interfaceICommunicationEngine
- Parameters:
soapServiceName
- The name of the soap service, may not be null or empty.soapOperationName
- The name of the operation, may not be null or empty.soapHandlers
- an array of handlers for the composed soap request, may not be null- Returns:
- The composed soap message, never null.
-
parseSoapRequest
Description copied from interface:ICommunicationEngine
This method parses a soap request message using the current portal state.- Specified by:
parseSoapRequest
in interfaceICommunicationEngine
- Parameters:
message
- The source message, may not be null.serviceName
- The name of the soap service, may not be null or empty.operationName
- The name of the operation.
-
composeSoapResponse
Description copied from interface:ICommunicationEngine
This method composes a soap response message using the current portal state.- Specified by:
composeSoapResponse
in interfaceICommunicationEngine
- Parameters:
serviceName
- The name of the soap service, may not be null or empty.operationName
- The name of the operation, may not be null or empty.- Returns:
- The composed response message, never null.
-
parseSoapResponse
Description copied from interface:ICommunicationEngine
This method parses a soap response message using the current portal state.- Specified by:
parseSoapResponse
in interfaceICommunicationEngine
- Parameters:
message
- The source message, may not be null.serviceName
- The name of the soap service, may not be null or empty.operationName
- The name of the operation.
-
validateSoapMessage
public void validateSoapMessage(ISoapServiceConfiguration configuration, ISoapMessageDefinition message, String xml) Description copied from interface:ICommunicationEngine
This method may be used to validate a soap message using the current portal state.- Specified by:
validateSoapMessage
in interfaceICommunicationEngine
- Parameters:
configuration
- The soap message configuration, may not be null.message
- The soap message definition, may not be null.xml
- The soap xml to validate, may not be null.
-
validateRestMessage
public void validateRestMessage(IRestServiceConfiguration configuration, IRestMessageDefinition message, String xml) Description copied from interface:ICommunicationEngine
This method may be used to validate a rest message using the current portal state.- Specified by:
validateRestMessage
in interfaceICommunicationEngine
- Parameters:
configuration
- The rest message configuration, may not be null.message
- The rest message definition, may not be null.xml
- The rest xml to validate, may not be null.
-