Class InstanceTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.model.InstanceTemplate

public class InstanceTemplate extends AbstractReportingTemplate
Template that can be used to initialize a (static) instance.
Since:
6.0
Author:
O. Kerpershoek
  • Constructor Details

    • InstanceTemplate

      public InstanceTemplate(String entityName, String instanceName)
      Constructs the template with the required parameters.
      Parameters:
      entityName - The entity name of the instance.
      instanceName - The name of the instance.
    • InstanceTemplate

      public InstanceTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String entityName, String instanceName)
      Constructs the template with the required parameters.
      Parameters:
      report - The initialization report that should be used to add errors and warnings to.
      entityName - The entity name of the instance.
      instanceName - The name of the instance.
  • Method Details

    • addAttributeValue

      public void addAttributeValue(String attributeName, com.aquima.interactions.foundation.IValue attrValue)
      This method may be used to set the value for an attribute.
      Parameters:
      attributeName - The name of the attribute.
      attrValue - The value for the attribute.
    • addRelationValue

      public void addRelationValue(String attributeName, InstanceTemplate staticInstance)
      This method may be used to set a relation in the instance.
      Parameters:
      attributeName - The name of the attribute.
      staticInstance - The instance that the attribute should refer to.
    • addRelationValues

      public void addRelationValues(String attributeName, InstanceTemplate... staticInstances)
      This method may be used to set a relation in the instance.
      Parameters:
      attributeName - The name of the attribute.
      staticInstances - The instances that the attribute should refer to.
    • getAttributeValues

      protected Iterator<Map.Entry<String,com.aquima.interactions.foundation.IValue>> getAttributeValues()
    • getRelationValues

      protected Iterator<Map.Entry<String,InstanceTemplate[]>> getRelationValues()
    • getEntityName

      protected String getEntityName()
    • getInstanceName

      protected String getInstanceName()
    • toDataSource

      public com.aquima.interactions.metamodel.ds.IInstanceDS toDataSource()
      This method converts the template to a data source that can be used to initialize an instance.
      Returns:
      a data source that can be used to initialize an instance.
    • getInstanceId

      protected com.aquima.interactions.foundation.GUID getInstanceId()
    • setInstanceId

      public void setInstanceId(String id)
      This method may be used to set the instance id.
      Parameters:
      id - The id of the instance
      Since:
      7.4