Class TypeMappingTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.communication.TypeMappingTemplate

public class TypeMappingTemplate extends AbstractReportingTemplate
This class may be used to quickly initialize a model.
Since:
9.0
Author:
Jon van Leuven, Arjan Pragt
  • Constructor Details

    • TypeMappingTemplate

      protected TypeMappingTemplate(String name, String entityName, com.aquima.interactions.foundation.connectivity.QualifiedName baseType, com.aquima.interactions.foundation.report.IInitializationReport report)
  • Method Details

    • getName

      protected String getName()
    • getEntityName

      protected String getEntityName()
    • getBaseType

      protected com.aquima.interactions.foundation.connectivity.QualifiedName getBaseType()
    • setRootGroup

      public GroupParticleMappingTemplate setRootGroup()
      This method sets the rootgroup of the type.
      Returns:
      The created template.
    • setRootGroup

      public GroupParticleMappingTemplate setRootGroup(com.aquima.interactions.communication.GroupParticleType groupType)
      Sets the root group of the given groupType.
      Parameters:
      groupType - the type for the group
      Returns:
      the created template
    • setRootGroup

      public GroupParticleMappingTemplate setRootGroup(com.aquima.interactions.communication.GroupParticleType groupType, String relationName)
      This method sets the rootgroup of the type.
      Parameters:
      groupType - The typ of the rootgroup, may not be null.
      relationName - The name of the relation for children within the group, may be null.
      Returns:
      The created template.
    • getRootGroup

      protected GroupParticleMappingTemplate getRootGroup()
    • setContent

      public void setContent(com.aquima.interactions.foundation.DataType dataType)
      This method sets the inner content of the type.
      Parameters:
      dataType - The datatype of the inner content, may not be null.
    • setContent

      public void setContent(com.aquima.interactions.foundation.DataType dataType, String attributeName)
      This method sets the inner content of the type.
      Parameters:
      dataType - The datatype of the inner content, may not be null.
      attributeName - The name of the attribute storing the content, may not be null.
    • getContentType

      protected com.aquima.interactions.foundation.DataType getContentType()
    • getContentAttribute

      protected String getContentAttribute()
    • addContentValidation

      public FieldValidationTemplate addContentValidation(String type)
      This method may be used to add a validation to the field.
      Parameters:
      type - The type of the validation that should be added.
      Returns:
      Template representing the newly added validation.
    • addAttribute

      public AttributeMappingTemplate addAttribute(String name, com.aquima.interactions.foundation.DataType dataType)
      This method adds an attribute to the type.
      Parameters:
      name - The name of the attribute, may not be null.
      dataType - The datatype of the attribute, may not be null.
      Returns:
      The created template.
    • addAttribute

      public AttributeMappingTemplate addAttribute(String name, com.aquima.interactions.foundation.DataType dataType, String attributeName)
      This method adds an attribute to the type.
      Parameters:
      name - The name of the attribute, may not be null.
      dataType - The datatype of the attribute, may not be null.
      attributeName - The name of the attribute storing the content of the attribute, may not be null.
      Returns:
      The created template.
    • addAttributeReference

      public AttributeMappingTemplate addAttributeReference(com.aquima.interactions.foundation.connectivity.QualifiedName reference, com.aquima.interactions.foundation.DataType dataType)
      This method adds an attribute reference to the type.
      Parameters:
      reference - The reference to a global attribute from a schema, may not be null.
      dataType - The datatype of the attribute, may not be null.
      Returns:
      The created template.
    • addAttributeReference

      public AttributeMappingTemplate addAttributeReference(com.aquima.interactions.foundation.connectivity.QualifiedName reference, com.aquima.interactions.foundation.DataType dataType, String attributeName)
      This method adds an attribute refreence to the type.
      Parameters:
      reference - The reference to a global attribute from a schema, may not be null.
      dataType - The datatype of the attribute, may not be null.
      attributeName - The name of the attribute storing the content of the attribute, may not be null.
      Returns:
      The created template.
    • toDatasource

      public com.aquima.interactions.communication.ds.ITypeMappingDS toDatasource()
    • getAttributeFields

      protected Iterator<AttributeMappingTemplate> getAttributeFields()
    • getContentValidations

      protected Iterator<FieldValidationTemplate> getContentValidations()