Interface IProject

All Superinterfaces:
Serializable
All Known Subinterfaces:
IApplicationConfig
All Known Implementing Classes:
ApplicationConfig, Project

public interface IProject extends Serializable
The project interface contains methods to access all the objects that are defined on the project scope.
Since:
7.1
Author:
O. Kerpershoek
  • Method Details

    • getName

      String getName()
      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.
      Returns:
      String containing the name of the application.
    • getApplicationId

      ApplicationID getApplicationId()
      This method returns the id of the application.
      Returns:
      The id of the application.
    • getVersion

      Version getVersion()
      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.
      Returns:
      The version of the application.
    • getLanguages

      ILanguage[] getLanguages()
      This method returns an array of all the languages that are defined to the application.
      Returns:
      Array containing all the language definitions.
    • getDefaultLanguage

      ILanguage getDefaultLanguage()
      Returns the default language for an application.
      Returns:
      The default language for the application.
    • getDefaultTheme

      Theme getDefaultTheme()
      Returns the default theme for an application.
      Returns:
      The default theme for the application.
    • getThemes

      Theme[] getThemes()
      This method returns an array of all the themes that are defined to the application.
      Returns:
      Array containing all the theme definitions.
    • getLanguageByCode

      ILanguage getLanguageByCode(String code)
      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.
      Parameters:
      code - of the language that is requested.
      Returns:
      The language definition for the specified code.
      Throws:
      UnknownLanguageException - this exception is thrown when the code does not identify a known language.
    • getLanguageByName

      ILanguage getLanguageByName(String name)
      This method returns the language specified for the given name. When no language can be found for the name an UnknownLanguageException will be thrown.
      Parameters:
      name - of the language that is requested.
      Returns:
      The language definition for the specified name.
      Throws:
      UnknownLanguageException - this exception is thrown when the name does not identify a known language.
    • getRoles

      IRole[] getRoles()
      This method returns an array containing all the defined roles.
      Returns:
      array containing all the defined roles
    • getTeams

      Team[] getTeams()
      This method returns an array containing all the defined teams.
      Returns:
      array containing all the defined teams
    • getChannels

      Channel[] getChannels()
      This method returns an array containing all the defined channels.
      Returns:
      array containing all the defined channels
    • containsMessage

      boolean containsMessage(String id)
      This method will check if a message exists for the specified id. The id is not case sensitive.
      Parameters:
      id - String containing the name (id)
      Returns:
      Boolean indicating if a message is defined for the specified id.
    • getMessage

      IMultilingualText getMessage(String id)
      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.
      Parameters:
      id - Identifier of the message that is requested.
      Returns:
      Message object for the specified id.
      Throws:
      UnknownMessageException - This exception is thrown when the id does not identify a known message.
    • getMessage

      IMultilingualText getMessage(String id, String... parameters)
      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.
      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.
      Throws:
      UnknownMessageException - This exception is thrown when the id does not identify a known message.
    • getValueFormats

      IValueFormat[] getValueFormats()
      This method returns an array containing the available value formats.
      Returns:
      an array containing the available value formats.
    • getValueFormat

      IValueFormat getValueFormat(String name)
      This method may be used to retrieve the value format for a specified name.
      Parameters:
      name - The name of the requested value format.
      Returns:
      The value format for the specified name.
      Throws:
      UnknownValueFormatException - This exception is thrown when no value format was defined with the specified name.
    • getServiceByName

      IServiceDefinition getServiceByName(String serviceName)
      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.
      Parameters:
      serviceName - The name of the service whose definition is requested.
      Returns:
      The definition of the service with the specified name.
      Throws:
      UnknownServiceException - This exception is thrown when no service definition is available for the specified name.
    • getExpanderByName

      IExpanderDefinition getExpanderByName(String expanderName)
      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.
      Parameters:
      expanderName - The name of the expander whose definition is requested.
      Returns:
      The definition of the expander with the specified name.
      Throws:
      UnknownExpanderException - This exception is thrown when no expander definition is available for the specified name.
    • getValidatorNames

      String[] getValidatorNames()
      This method returns an array containing the names of the (custom) validators that are available.
      Returns:
      array containing the names of the (custom) validators that are available.
    • getValidatorByName

      IValidatorDefinition getValidatorByName(String name)
      This method returns the validator definition for the specified type name.
      Parameters:
      name - The type name of the requested validator.
      Returns:
      The validator definition for the specified type name.
      Throws:
      UnknownValidatorException - This exception is thrown when no validator is known with the specified name.
    • getValueFormatDefinition

      IValueFormatDefinition getValueFormatDefinition(String name)
      This method returns the value format definition for the specified name.
      Parameters:
      name - The name of the requested value format.
      Returns:
      The value format definition for the specified name.
      Throws:
      UnknownValueFormatException - This exception is thrown when no value format is known with the specified name.
    • getValueFormatDefinitions

      IValueFormatDefinition[] getValueFormatDefinitions()
      This method returns an array containing the names of the value formats that are available.
      Returns:
      array containing the names of the value formats that are available.
    • getConnectionDefinition

      IConnectionDefinition getConnectionDefinition(String name, ConnectionType type)
      This method returns the value connection definition for the specified name.
      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.
      Throws:
      UnknownConnectionException - This exception is thrown when no connection definition is known with the specified name.
    • getConnectionDefinitions

      IConnectionDefinition[] getConnectionDefinitions(ConnectionType type)
      This method returns an array containing the names of the connection definitions that are available.
      Parameters:
      type - The type of the requested connection definitions.
      Returns:
      array containing the names of the connection definitions that are available.
    • getConnectionManager

      IConnectionManager getConnectionManager()
      This method returns the connection manager for this project. It may contain connections that are defined in this project.
      Returns:
      The connection manager for this project.
    • getRoleByName

      IRole getRoleByName(String name)
      This method returns the role specified for the given name. When no role can be found for the name an UnknownRoleException will be thrown.
      Parameters:
      name - of the role that is requested.
      Returns:
      The role definition for the specified name.
      Throws:
      UnknownRoleException - this exception is thrown when the name does not identify a known role.
    • getPortalMessageDefinitionByName

      IPortalMessageDefinition getPortalMessageDefinitionByName(String name)
      Returns the portal message with the given name, if no portal message exists an UnknowPortalMessageException will be thrown
      Parameters:
      name - the name of the portal message
      Returns:
      the portal message definition
      Throws:
      UnknowPortalMessageException - when no portal message can be found by the provided name
    • getGlobalParameters

      IGlobalParameterDefinition[] getGlobalParameters()
      Returns an array with all the global parameters definition. If none exists, an empty array will be returned.
      Returns:
      the available global parameters or an empty array
    • getGlobalParameterByName

      IGlobalParameterDefinition getGlobalParameterByName(String name)
      Returns the global parameter with the given name, if no global parameter exists an UnknownGlobalParameterException will be thrown
      Parameters:
      name - - name of the global parameter's definition to be returned
      Returns:
      - the global parameter's definition
      Throws:
      UnknownGlobalParameterException - when no global parameter exists with the provided name
    • getFieldTypes

      IFieldTypeDefinition[] getFieldTypes()
      Returns an array with all the field types definition. If none exists, an empty array will be returned.
      Returns:
      the available field types or an empty array
    • getFieldTypeByName

      IFieldTypeDefinition getFieldTypeByName(String name)
      Returns the field type with the given name, if no field type exists an UnknownFieldTypeException will be thrown
      Parameters:
      name - - name of the field type's definition to be returned
      Returns:
      - the field type's definition
      Throws:
      UnknownFieldTypeException - when no field type exists with the provided name