Class ServiceContextTemplate
java.lang.Object
com.aquima.interactions.test.templates.context.EventContextTemplate
com.aquima.interactions.test.templates.context.ServiceContextTemplate
Template that can be used to create a service context.
- Since:
- 6.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs the template with a new application template.ServiceContextTemplate
(IApplicationTemplate application) Constructs the template with the specified application template. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExpressionParameter
(String name, String expressionValue) Add an expression parameter to the context.void
addParameter
(String name, String strValue) This method can be used to add a service parameter.void
addReferenceParameter
(String name, String refName) Add a reference parameter to the context.void
addReferenceParameter
(String name, String... refNames) Add a reference parameter to the context.void
addValueParameter
(String name, com.aquima.interactions.foundation.IValue value) Add a value parameter to the context.protected String
com.aquima.interactions.portal.model.def.TypedParameters
This method will return the parameters for this context template.protected String
protected String
void
setAuditEngine
(com.aquima.interactions.foundation.logging.audit.IAuditEngine auditEngine) This method should be invoked to set a specific auditEngine.void
setChannelName
(String name) This method may be used to specify the channel that should be used when creating the context.void
setCommentsManager
(com.aquima.interactions.portal.ICommentsManager commentsManager) void
setParameters
(com.aquima.interactions.portal.ITypedParameters parameters) This method can be used to set the service parameters.void
setServiceCallName
(String name) This method should be invoked to specify the service call name.void
setServiceTypeName
(String name) This method should be invoked to specify the service type name.com.aquima.interactions.portal.IServiceContext
This method converts the template to a service context.Methods inherited from class com.aquima.interactions.test.templates.context.EventContextTemplate
getEvent, getSessionId, setFiredEvent, setSessionId
-
Constructor Details
-
ServiceContextTemplate
public ServiceContextTemplate()Constructs the template with a new application template. -
ServiceContextTemplate
Constructs the template with the specified application template.- Parameters:
application
- The application template that should be used by the context.
-
-
Method Details
-
setChannelName
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
-
setServiceTypeName
This method should be invoked to specify the service type name.- Parameters:
name
- The service type name.
-
setServiceCallName
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
This method can be used to add a service parameter.- Parameters:
name
- The name of the parameter.strValue
- The value of the parameter.
-
getApplicationTemplate
- Specified by:
getApplicationTemplate
in classEventContextTemplate
-
getServiceTypeName
-
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
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
Add a value parameter to the context.- Parameters:
name
- The name of the parameter.value
- The value.
-
addReferenceParameter
Add a reference parameter to the context.- Parameters:
name
- The name of the parameter.refName
- The name of the element referring to.
-
addReferenceParameter
Add a reference parameter to the context.- Parameters:
name
- The name of the parameter.refNames
- The names of the elements referring to.
-