Class NodeTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.flow.NodeTemplate
Direct Known Subclasses:
ConditionNodeTemplate, EndNodeTemplate, EventNodeTemplate, FlowNodeTemplate, FunctionNodeTemplate, PageNodeTemplate, ServiceNodeTemplate

public abstract class NodeTemplate extends AbstractReportingTemplate
This template represents a node in a flow.
Since:
6.0
Author:
O. Kerpershoek, F. van der Meer
  • Constructor Details

    • NodeTemplate

      protected NodeTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, FlowTemplate flowTemplate, String targetId)
  • Method Details

    • addEndNode

      public EndNodeTemplate addEndNode(String exitEvent)
      This method will create an end node, and connect it to the default exit event of this node.
      Parameters:
      exitEvent - The exit event of the end node.
      Returns:
      Template representing the condition node.
    • addCondition

      public ConditionNodeTemplate addCondition(String expression)
      This method will create a condition node, and connect it to the default exit event of this node.
      Parameters:
      expression - The expression of the condition node.
      Returns:
      Template representing the condition node.
    • addServiceCall

      public ServiceNodeTemplate addServiceCall(String callName)
      This method will add a service call node, and connect it to the default exit event of this node.
      Parameters:
      callName - The service call name of the node.
      Returns:
      Service node template representing the service call node.
    • addServiceCall

      public ServiceNodeTemplate addServiceCall(String serviceCallName, String serviceTypeName, com.aquima.interactions.foundation.IParameters parameters)
      This method will add a service call node, and connect it to the default exit event of this node.
      Parameters:
      serviceCallName - The call name of the service.
      serviceTypeName - The type name of the service.
      parameters - The service parameters.
      Returns:
      Service node template representing the service call node.
    • addFunctionCall

      public FunctionNodeTemplate addFunctionCall(String functionCallName, String moduleName, String flowName)
      This method creates a new function call and adds a function call sub node to the current flow node.
      Parameters:
      functionCallName - The call name of the function.
      moduleName - The module the function flow resides in
      flowName - The name of the flow to execute as function
      Returns:
      Function node template representing the function call node.
    • addPage

      public PageNodeTemplate addPage(String pageName)
      This method will add a page node, and connect it to the default exit event of this node.
      Parameters:
      pageName - The name of the page.
      Returns:
      Page node template representing the page node.
    • addEvent

      public EventNodeTemplate addEvent(com.aquima.interactions.flow.EventNodeType eventType)
      This method will add an event node, and connect it to the default exit event of this node.
      Parameters:
      eventType - The type of the event.
      Returns:
      Event node template representing the event node.
    • addFlow

      public FlowNodeTemplate addFlow(String flowName)
      This method will add a (sub)flow node, and connect it to the default exit event of this node. If the name passed to this method is equal to the name of the flow it is added to, this method will NOT create a sub-flow node, but instead it will create an edge linking back to the start node of this flow.
      Parameters:
      flowName - The name of the sub-flow.
      Returns:
      Flow node node template representing the flow node, or null when the flow links back to itself.
    • getEdge

      public EdgeTemplate getEdge(String label)
      This method will return the edge for the specified label, the if previously an edge with the same name was already requested the same edge will be returned.
      Parameters:
      label - The label for which this edge is applied.
      Returns:
      The edge corresponding to the label.
    • getEdge

      public EdgeTemplate getEdge(com.aquima.interactions.flow.ExitEvent exitEvent)
      This method will return the edge for the specified label, the if previously an edge with the same name was already requested the same edge will be returned.
      Parameters:
      exitEvent - The label for which this edge is applied.
      Returns:
      The edge corresponding to the label.
    • getTargetId

      protected String getTargetId()
    • getFlowTemplate

      protected FlowTemplate getFlowTemplate()
    • getId

      protected String getId()
    • getEdges

      protected List<EdgeTemplate> getEdges()
    • toDataSource

      public abstract com.aquima.interactions.flow.ds.INodeDS toDataSource()
      This method converts the template to a data source that can be used to initialize a flow node.
      Returns:
      a data source that can be used to initialize a flow node.