Class Project

java.lang.Object
com.aquima.interactions.project.impl.Project
All Implemented Interfaces:
IProject, Serializable

public class Project extends Object implements IProject
Implementation of the IProject interface.
Since:
7.1
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • Project

      public Project(IProjectDS datasource)
      Constructs, initializes and validates the project using the provided data-source.
      Parameters:
      datasource - The object that should be used to initialize the project with.
      Throws:
      InitializationException - This exception is thrown when the project could not be initialized.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: IProject
      This method returns the (technical) name of the application for which the metamodel is defined. The combination of application name and version uniquely identify a metamodel.
      Specified by:
      getName in interface IProject
      Returns:
      String containing the name of the application.
    • getVersion

      public Version getVersion()
      Description copied from interface: IProject
      This method returns the version of the application for which the metamodel is defined. The combination of application name and version uniquely identify a metamodel.
      Specified by:
      getVersion in interface IProject
      Returns:
      The version of the application.
    • getLanguages

      public ILanguage[] getLanguages()
      Description copied from interface: IProject
      This method returns an array of all the languages that are defined to the application.
      Specified by:
      getLanguages in interface IProject
      Returns:
      Array containing all the language definitions.
    • getLanguageByCode

      public ILanguage getLanguageByCode(String code)
      Description copied from interface: IProject
      This method returns the language specified for the given language code. When no language can be found for the code an UnknownLanguageException will be thrown.
      Specified by:
      getLanguageByCode in interface IProject
      Parameters:
      code - of the language that is requested.
      Returns:
      The language definition for the specified code.
    • getLanguageByName

      public final ILanguage getLanguageByName(String languageName)
      Description copied from interface: IProject
      This method returns the language specified for the given name. When no language can be found for the name an UnknownLanguageException will be thrown.
      Specified by:
      getLanguageByName in interface IProject
      Parameters:
      languageName - of the language that is requested.
      Returns:
      The language definition for the specified name.
    • getTeams

      public Team[] getTeams()
      Description copied from interface: IProject
      This method returns an array containing all the defined teams.
      Specified by:
      getTeams in interface IProject
      Returns:
      array containing all the defined teams
    • getRoles

      public IRole[] getRoles()
      Description copied from interface: IProject
      This method returns an array containing all the defined roles.
      Specified by:
      getRoles in interface IProject
      Returns:
      array containing all the defined roles
    • getChannels

      public Channel[] getChannels()
      Description copied from interface: IProject
      This method returns an array containing all the defined channels.
      Specified by:
      getChannels in interface IProject
      Returns:
      array containing all the defined channels
    • getDefaultLanguage

      public ILanguage getDefaultLanguage()
      Description copied from interface: IProject
      Returns the default language for an application.
      Specified by:
      getDefaultLanguage in interface IProject
      Returns:
      The default language for the application.
    • addMessage

      protected void addMessage(String key, IMultilingualText message)
    • containsMessage

      public boolean containsMessage(String id)
      Description copied from interface: IProject
      This method will check if a message exists for the specified id. The id is not case sensitive.
      Specified by:
      containsMessage in interface IProject
      Parameters:
      id - String containing the name (id)
      Returns:
      Boolean indicating if a message is defined for the specified id.
    • getMessage

      public IMultilingualText getMessage(String id)
      Description copied from interface: IProject
      This method returns the message object belonging to the specified id. When no message could be found for the given id an UnknownMessageException is thrown.
      Specified by:
      getMessage in interface IProject
      Parameters:
      id - Identifier of the message that is requested.
      Returns:
      Message object for the specified id.
    • getMessage

      public IMultilingualText getMessage(String id, String... parameters)
      Description copied from interface: IProject
      This method returns the message object belonging to the specified id. With parameters. these parameters are inserted in the message, when the message string contains {} expressions. For example: a message definition of test=Test message with 3 parameters namely: {0}, {1} and {2} will result in the expanded message. When no message could be found for the given id an UnknownMessageException is thrown.
      Specified by:
      getMessage in interface IProject
      Parameters:
      id - Identifier of the message that is requested.
      parameters - Array of parameter values that should be used in the message.
      Returns:
      Message object for the specified id.
    • getDefaultTheme

      public Theme getDefaultTheme()
      Description copied from interface: IProject
      Returns the default theme for an application.
      Specified by:
      getDefaultTheme in interface IProject
      Returns:
      The default theme for the application.
    • getThemes

      public Theme[] getThemes()
      Description copied from interface: IProject
      This method returns an array of all the themes that are defined to the application.
      Specified by:
      getThemes in interface IProject
      Returns:
      Array containing all the theme definitions.
    • getValueFormat

      public IValueFormat getValueFormat(String name)
      Description copied from interface: IProject
      This method may be used to retrieve the value format for a specified name.
      Specified by:
      getValueFormat in interface IProject
      Parameters:
      name - The name of the requested value format.
      Returns:
      The value format for the specified name.
    • getValueFormats

      public IValueFormat[] getValueFormats()
      Description copied from interface: IProject
      This method returns an array containing the available value formats.
      Specified by:
      getValueFormats in interface IProject
      Returns:
      an array containing the available value formats.
    • addExpander

      protected void addExpander(ExpanderDefinition definition)
    • getExpanderByName

      public IExpanderDefinition getExpanderByName(String expanderName)
      Description copied from interface: IProject
      This method returns the expander definition for the specified name. If no expander definition can be found for the name, an exception is thrown. The name is not case sensitive.
      Specified by:
      getExpanderByName in interface IProject
      Parameters:
      expanderName - The name of the expander whose definition is requested.
      Returns:
      The definition of the expander with the specified name.
    • addService

      protected void addService(ServiceDefinition definition)
    • isValidName

      protected static boolean isValidName(String name)
    • getServiceByName

      public IServiceDefinition getServiceByName(String serviceName)
      Description copied from interface: IProject
      This method returns the service definition for the specified name. If no service definition can be found for the name, an exception is thrown. The name is not case sensitive.
      Specified by:
      getServiceByName in interface IProject
      Parameters:
      serviceName - The name of the service whose definition is requested.
      Returns:
      The definition of the service with the specified name.
    • getValidatorByName

      public IValidatorDefinition getValidatorByName(String name)
      Description copied from interface: IProject
      This method returns the validator definition for the specified type name.
      Specified by:
      getValidatorByName in interface IProject
      Parameters:
      name - The type name of the requested validator.
      Returns:
      The validator definition for the specified type name.
    • addValidator

      protected void addValidator(ValidatorDefinition definition)
    • getValidatorNames

      public String[] getValidatorNames()
      Description copied from interface: IProject
      This method returns an array containing the names of the (custom) validators that are available.
      Specified by:
      getValidatorNames in interface IProject
      Returns:
      array containing the names of the (custom) validators that are available.
    • getValueFormatDefinition

      public IValueFormatDefinition getValueFormatDefinition(String name)
      Description copied from interface: IProject
      This method returns the value format definition for the specified name.
      Specified by:
      getValueFormatDefinition in interface IProject
      Parameters:
      name - The name of the requested value format.
      Returns:
      The value format definition for the specified name.
    • getValueFormatDefinitions

      public IValueFormatDefinition[] getValueFormatDefinitions()
      Description copied from interface: IProject
      This method returns an array containing the names of the value formats that are available.
      Specified by:
      getValueFormatDefinitions in interface IProject
      Returns:
      array containing the names of the value formats that are available.
    • getConnectionManager

      public IConnectionManager getConnectionManager()
      Description copied from interface: IProject
      This method returns the connection manager for this project. It may contain connections that are defined in this project.
      Specified by:
      getConnectionManager in interface IProject
      Returns:
      The connection manager for this project.
    • getConnectionDefinition

      public IConnectionDefinition getConnectionDefinition(String name, ConnectionType type)
      Description copied from interface: IProject
      This method returns the value connection definition for the specified name.
      Specified by:
      getConnectionDefinition in interface IProject
      Parameters:
      name - The name of the requested connection definition.
      type - The type of the requested connection definition.
      Returns:
      The connection definition for the specified name.
    • getConnectionDefinitions

      public IConnectionDefinition[] getConnectionDefinitions(ConnectionType type)
      Description copied from interface: IProject
      This method returns an array containing the names of the connection definitions that are available.
      Specified by:
      getConnectionDefinitions in interface IProject
      Parameters:
      type - The type of the requested connection definitions.
      Returns:
      array containing the names of the connection definitions that are available.
    • addConnection

      protected void addConnection(ConnectionDefinition definition)
    • getRoleByName

      public IRole getRoleByName(String name)
      Description copied from interface: IProject
      This method returns the role specified for the given name. When no role can be found for the name an UnknownRoleException will be thrown.
      Specified by:
      getRoleByName in interface IProject
      Parameters:
      name - of the role that is requested.
      Returns:
      The role definition for the specified name.
    • addRole

      protected void addRole(IRole role)
    • getApplicationId

      public ApplicationID getApplicationId()
      Description copied from interface: IProject
      This method returns the id of the application.
      Specified by:
      getApplicationId in interface IProject
      Returns:
      The id of the application.
    • getPortalMessageDefinitionByName

      public IPortalMessageDefinition getPortalMessageDefinitionByName(String name)
      Description copied from interface: IProject
      Returns the portal message with the given name, if no portal message exists an UnknowPortalMessageException will be thrown
      Specified by:
      getPortalMessageDefinitionByName in interface IProject
      Parameters:
      name - the name of the portal message
      Returns:
      the portal message definition
    • addPortalMessage

      protected void addPortalMessage(PortalMessageDefinition definition)
    • getGlobalParameters

      public IGlobalParameterDefinition[] getGlobalParameters()
      Description copied from interface: IProject
      Returns an array with all the global parameters definition. If none exists, an empty array will be returned.
      Specified by:
      getGlobalParameters in interface IProject
      Returns:
      the available global parameters or an empty array
    • addGlobalParameter

      protected void addGlobalParameter(IGlobalParameterDefinition globalParameter)
    • getGlobalParameterByName

      public IGlobalParameterDefinition getGlobalParameterByName(String name)
      Description copied from interface: IProject
      Returns the global parameter with the given name, if no global parameter exists an UnknownGlobalParameterException will be thrown
      Specified by:
      getGlobalParameterByName in interface IProject
      Parameters:
      name - - name of the global parameter's definition to be returned
      Returns:
      - the global parameter's definition
    • addFieldType

      protected void addFieldType(IFieldTypeDefinition fieldType)
    • getFieldTypes

      public IFieldTypeDefinition[] getFieldTypes()
      Description copied from interface: IProject
      Returns an array with all the field types definition. If none exists, an empty array will be returned.
      Specified by:
      getFieldTypes in interface IProject
      Returns:
      the available field types or an empty array
    • getFieldTypeByName

      public IFieldTypeDefinition getFieldTypeByName(String name)
      Description copied from interface: IProject
      Returns the field type with the given name, if no field type exists an UnknownFieldTypeException will be thrown
      Specified by:
      getFieldTypeByName in interface IProject
      Parameters:
      name - - name of the field type's definition to be returned
      Returns:
      - the field type's definition