Class InstanceTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.model.InstanceTemplate
Template that can be used to initialize a (static) instance.
- Since:
- 6.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionInstanceTemplate
(com.aquima.interactions.foundation.report.IInitializationReport report, String entityName, String instanceName) Constructs the template with the required parameters.InstanceTemplate
(String entityName, String instanceName) Constructs the template with the required parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeValue
(String attributeName, com.aquima.interactions.foundation.IValue attrValue) This method may be used to set the value for an attribute.void
addRelationValue
(String attributeName, InstanceTemplate staticInstance) This method may be used to set a relation in the instance.void
addRelationValues
(String attributeName, InstanceTemplate... staticInstances) This method may be used to set a relation in the instance.protected String
protected com.aquima.interactions.foundation.GUID
protected String
protected Iterator
<Map.Entry<String, InstanceTemplate[]>> void
setInstanceId
(String id) This method may be used to set the instance id.com.aquima.interactions.metamodel.ds.IInstanceDS
This method converts the template to a data source that can be used to initialize an instance.Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
Constructor Details
-
InstanceTemplate
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
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
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
-
getRelationValues
-
getEntityName
-
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
This method may be used to set the instance id.- Parameters:
id
- The id of the instance- Since:
- 7.4
-