Class ProjectTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.project.ProjectTemplate

public class ProjectTemplate extends AbstractReportingTemplate
Template that may be used to create a data source implementation for a project.
Since:
7.1
Author:
O. Kerpershoek
  • Field Details

    • DEFAULT_LANGUAGE

      public static final LanguageTemplate DEFAULT_LANGUAGE
      The default language that is used by the template.
  • Constructor Details

    • ProjectTemplate

      public ProjectTemplate(String name, String version)
      Constructs the template using a new report.
      Parameters:
      name - The name of the project.
      version - The version of the project.
    • ProjectTemplate

      public ProjectTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String name, String version)
      Constructs the template with an existing report.
      Parameters:
      report - The report that should be used for errors and warnings.
      name - The name of the project.
      version - The version of the project.
    • ProjectTemplate

      public ProjectTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String name, com.aquima.interactions.foundation.Version version)
      Constructs the template with an existing report.
      Parameters:
      report - The report that should be used for errors and warnings.
      name - The name of the project.
      version - The version of the project.
  • Method Details

    • setVersion

      public void setVersion(com.aquima.interactions.foundation.Version version)
      This method sets the version of the project.
      Parameters:
      version - the new version
    • getName

      public String getName()
      This method returns the name of the project.
      Returns:
      The name of the project.
    • getApplicationID

      public com.aquima.interactions.foundation.ApplicationID getApplicationID()
      This method returns the application ID of the project.
      Returns:
      The application ID of the project.
    • addValueFormat

      public void addValueFormat(String name, com.aquima.interactions.foundation.DataType type, String languageCode, String pattern)
      This method may be used to add a value format.
      Parameters:
      name - The name of the value format.
      type - The data type the format is defined for.
      languageCode - The code of the language that should be used to determine the number symbols.
      pattern - The pattern of the value format.
    • getValueFormats

      protected Iterator<com.aquima.interactions.test.templates.project.ValueFormatModel> getValueFormats()
    • addMessage

      public void addMessage(String key, String message)
      This method may be used to add messages with a key (normally defined in messages.properties).
      Parameters:
      key - Key of the message.
      message - The message text.
    • addMessage

      public void addMessage(String key, com.aquima.interactions.foundation.text.IMultilingualText message)
      This method may be used to add messages with a key (normally defined in messages.properties).
      Parameters:
      key - Key of the message.
      message - The message text.
      Since:
      8.4
    • getLanguagesIterator

      protected Iterator<LanguageTemplate> getLanguagesIterator()
    • addExpander

      public ExpanderTemplate addExpander(String name)
      This method may be used to add an expander definition.
      Parameters:
      name - The name of the container expander definition.
      Returns:
      Template for the newly added container expander definition.
    • getExpanders

      protected Iterator<ExpanderTemplate> getExpanders()
    • addService

      public ServiceTemplate addService(String name)
      This method may be used to add a service definition.
      Parameters:
      name - The name of the service definition.
      Returns:
      Template representing the newly added service definition.
    • getServices

      protected Iterator<ServiceTemplate> getServices()
    • getConnections

      protected Iterator<ResourceConnectionTemplate> getConnections()
    • getPortalMessages

      protected Iterator<PortalMessageTemplate> getPortalMessages()
    • getGlobalParameters

      protected Collection<GlobalParameterTemplate> getGlobalParameters()
    • getFieldTypes

      protected Collection<FieldTypeTemplate> getFieldTypes()
    • addGlobalParameter

      public GlobalParameterTemplate addGlobalParameter(String name)
    • addFieldType

      public FieldTypeTemplate addFieldType(String name)
    • addRole

      public RoleTemplate addRole(String name)
      This method may be used to add a role to the meta model.
      Parameters:
      name - The name of the role that should be added.
      Returns:
      The create role.
    • addChannel

      public void addChannel(String channel)
      This method may be used to add a channel to the meta model.
      Parameters:
      channel - The name of the channel that should be added.
    • addTeam

      public void addTeam(String team)
      This method may be used to add a team to the meta model.
      Parameters:
      team - The name of the team that should be added.
    • getRoles

      public Collection<RoleTemplate> getRoles()
    • getChannels

      public Collection<String> getChannels()
      This method returns all channels defined in the metamodel template.
      Returns:
      Collection of String.
    • getTeams

      public Collection<String> getTeams()
      This method returns all teams defined in the metamodel template.
      Returns:
      Collection of String.
    • addTheme

      public void addTheme(String theme)
      This method may be used to add a theme to the meta model.
      Parameters:
      theme - The name of the theme that should be added.
    • getThemes

      protected String[] getThemes()
    • getMessages

      protected com.aquima.interactions.test.templates.project.Message[] getMessages()
    • addLanguage

      public LanguageTemplate addLanguage(String code, String name)
      This method may be used to add a language to the meta model.
      Parameters:
      code - The code of the language.
      name - The name of the language.
      Returns:
      Language template representing the added language.
    • getDefaultLanguage

      public com.aquima.interactions.foundation.text.ILanguage getDefaultLanguage()
      This method returns the default language of the template.
      Returns:
      The default language of the template.
    • getLanguages

      public LanguageTemplate[] getLanguages()
      This method returns an array with the language templates that are defined.
      Returns:
      an array with the language templates that are defined.
    • addValidator

      public ValidatorTemplate addValidator(String name)
      This method may be used to register a new validator type.
      Parameters:
      name - The name of the validator that is added.
      Returns:
      Template representing the newly added validator type.
    • getValidatorTypes

      protected List<ValidatorTemplate> getValidatorTypes()
    • toDataSource

      public com.aquima.interactions.project.ds.IProjectDS toDataSource()
      This method converts the template to a data source that can be used to initialize a project.
      Returns:
      a data source that can be used to initialize a project.
    • addCsvResourceConnection

      public CsvResourceConnectionTemplate addCsvResourceConnection(String name)
    • addResourceConnection

      public ResourceConnectionTemplate addResourceConnection(String name)
    • addPortalMessage

      public PortalMessageTemplate addPortalMessage(String name)