Class ServiceContextTemplate

java.lang.Object
com.aquima.interactions.test.templates.context.EventContextTemplate
com.aquima.interactions.test.templates.context.ServiceContextTemplate

public class ServiceContextTemplate extends EventContextTemplate
Template that can be used to create a service context.
Since:
6.0
Author:
O. Kerpershoek
  • Constructor Details

    • ServiceContextTemplate

      public ServiceContextTemplate()
      Constructs the template with a new application template.
    • ServiceContextTemplate

      public ServiceContextTemplate(IApplicationTemplate application)
      Constructs the template with the specified application template.
      Parameters:
      application - The application template that should be used by the context.
  • Method Details

    • setChannelName

      public void setChannelName(String name)
      This method may be used to specify the channel that should be used when creating the context.
      Parameters:
      name - the channel that should be used when creating the context.
    • getChannelName

      protected String getChannelName()
    • setServiceTypeName

      public void setServiceTypeName(String name)
      This method should be invoked to specify the service type name.
      Parameters:
      name - The service type name.
    • setServiceCallName

      public void setServiceCallName(String name)
      This method should be invoked to specify the service call name.
      Parameters:
      name - The service call name.
    • setAuditEngine

      public void setAuditEngine(com.aquima.interactions.foundation.logging.audit.IAuditEngine auditEngine)
      This method should be invoked to set a specific auditEngine.
      Parameters:
      auditEngine - The auditEngine
    • setCommentsManager

      public void setCommentsManager(com.aquima.interactions.portal.ICommentsManager commentsManager)
    • setParameters

      public void setParameters(com.aquima.interactions.portal.ITypedParameters parameters)
      This method can be used to set the service parameters.
      Parameters:
      parameters - The parameters.
    • addParameter

      public void addParameter(String name, String strValue)
      This method can be used to add a service parameter.
      Parameters:
      name - The name of the parameter.
      strValue - The value of the parameter.
    • getApplicationTemplate

      public IApplicationTemplate getApplicationTemplate()
      Specified by:
      getApplicationTemplate in class EventContextTemplate
    • getServiceTypeName

      protected String getServiceTypeName()
    • getServiceCallName

      protected String getServiceCallName()
    • getParameters

      public com.aquima.interactions.portal.model.def.TypedParameters getParameters()
      This method will return the parameters for this context template.
      Returns:
      The parameters
    • toContext

      public com.aquima.interactions.portal.IServiceContext toContext()
      This method converts the template to a service context.
      Returns:
      Service context based on the template.
    • addExpressionParameter

      public void addExpressionParameter(String name, String expressionValue)
      Add an expression parameter to the context.
      Parameters:
      name - The name of the parameter.
      expressionValue - The expression value.
      Throws:
      com.aquima.interactions.foundation.exception.AppException - When an error occurred parsing the expression.
    • addValueParameter

      public void addValueParameter(String name, com.aquima.interactions.foundation.IValue value)
      Add a value parameter to the context.
      Parameters:
      name - The name of the parameter.
      value - The value.
    • addReferenceParameter

      public void addReferenceParameter(String name, String refName)
      Add a reference parameter to the context.
      Parameters:
      name - The name of the parameter.
      refName - The name of the element referring to.
    • addReferenceParameter

      public void addReferenceParameter(String name, String... refNames)
      Add a reference parameter to the context.
      Parameters:
      name - The name of the parameter.
      refNames - The names of the elements referring to.