Class CommunicationEngine

java.lang.Object
com.aquima.interactions.portal.model.session.CommunicationEngine
All Implemented Interfaces:
ICommunicationEngine

public class CommunicationEngine extends Object implements 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 Details

  • Method Details

    • getRestService

      public IRestServiceDefinition getRestService(String serviceName)
      Description copied from interface: ICommunicationEngine
      This method returns the rest service.
      Specified by:
      getRestService in interface ICommunicationEngine
      Parameters:
      serviceName - The name of the service, may not be null.
      Returns:
      The definition of the service.
    • getRestServiceNames

      public String[] getRestServiceNames()
      Description copied from interface: ICommunicationEngine
      This method returns the available rest service name.
      Specified by:
      getRestServiceNames in interface ICommunicationEngine
      Returns:
      The names of the rest services that are available, never null, but may be an empty array.
    • getSoapServiceNames

      public String[] getSoapServiceNames()
      Description copied from interface: ICommunicationEngine
      This method returns the available service name.
      Specified by:
      getSoapServiceNames in interface ICommunicationEngine
      Returns:
      The names of the services that are available, never null, but may be an empty array.
    • getSoapService

      public ISoapServiceDefinition getSoapService(String serviceName)
      Description copied from interface: ICommunicationEngine
      This method return the definition of a service for the specified name.
      Specified by:
      getSoapService in interface ICommunicationEngine
      Parameters:
      serviceName - The name of the service that is requested (case insensitive)
      Returns:
      The service definition, never null
    • getSchemaSetNames

      public String[] getSchemaSetNames()
      Description copied from interface: ICommunicationEngine
      This method returns the available xsd type names.
      Specified by:
      getSchemaSetNames in interface ICommunicationEngine
      Returns:
      The names of the xsd types that are available, never null, but may be an empty array.
    • getSchemaSet

      public ISchemaSetDefinition getSchemaSet(String name)
      Description copied from interface: ICommunicationEngine
      This method return the definition of a xsd type for the specified name.
      Specified by:
      getSchemaSet in interface ICommunicationEngine
      Parameters:
      name - The name of the xsd type that is requested (case insensitive)
      Returns:
      The xsd type definition, never null
    • getSoapMessageHandlers

      public ISoapMessageHandler[] getSoapMessageHandlers(String serviceCallName)
      Description copied from interface: ICommunicationEngine
      This method returns the soap message handlers for the specified service call.
      Specified by:
      getSoapMessageHandlers in interface ICommunicationEngine
      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 interface ICommunicationEngine
      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 interface ICommunicationEngine
      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

      public IRestOperationDefinition matchOperation(IRestRequestMessage request, String serviceName)
      Description copied from interface: ICommunicationEngine
      This method matches the urn of a request to an operation of the service.
      Specified by:
      matchOperation in interface ICommunicationEngine
      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

      public void parseRestRequest(IRestRequestMessage request, String serviceName, String operationName)
      Description copied from interface: ICommunicationEngine
      This method parses a rest request message using the current portal state.
      Specified by:
      parseRestRequest in interface ICommunicationEngine
      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

      public IRestMessage composeRestResponse(String serviceName, String operationName, String mimeType)
      Description copied from interface: ICommunicationEngine
      This method composes a rest response message using the current portal state.
      Specified by:
      composeRestResponse in interface ICommunicationEngine
      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

      public void parseRestResponse(IRestMessage response, String serviceName, String operationName)
      Description copied from interface: ICommunicationEngine
      This method parses a rest response message using the current portal state.
      Specified by:
      parseRestResponse in interface ICommunicationEngine
      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

      public ISoapMessage composeSoapRequest(String serviceName, String operationName)
      Description copied from interface: ICommunicationEngine
      This methods composes a soap request message using the current portal state.
      Specified by:
      composeSoapRequest in interface ICommunicationEngine
      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 interface ICommunicationEngine
      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

      public void parseSoapRequest(ISoapMessage message, String serviceName, String operationName)
      Description copied from interface: ICommunicationEngine
      This method parses a soap request message using the current portal state.
      Specified by:
      parseSoapRequest in interface ICommunicationEngine
      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

      public ISoapMessage composeSoapResponse(String serviceName, String operationName)
      Description copied from interface: ICommunicationEngine
      This method composes a soap response message using the current portal state.
      Specified by:
      composeSoapResponse in interface ICommunicationEngine
      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

      public void parseSoapResponse(ISoapMessage message, String serviceName, String operationName)
      Description copied from interface: ICommunicationEngine
      This method parses a soap response message using the current portal state.
      Specified by:
      parseSoapResponse in interface ICommunicationEngine
      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 interface ICommunicationEngine
      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 interface ICommunicationEngine
      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.