Class Project
java.lang.Object
com.aquima.interactions.project.impl.Project
- All Implemented Interfaces:
IProject
,Serializable
Implementation of the IProject interface.
- Since:
- 7.1
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProject
(IProjectDS datasource) Constructs, initializes and validates the project using the provided data-source. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addConnection
(ConnectionDefinition definition) protected void
addExpander
(ExpanderDefinition definition) protected void
addFieldType
(IFieldTypeDefinition fieldType) protected void
addGlobalParameter
(IGlobalParameterDefinition globalParameter) protected void
addMessage
(String key, IMultilingualText message) protected void
addPortalMessage
(PortalMessageDefinition definition) protected void
protected void
addService
(ServiceDefinition definition) protected void
addValidator
(ValidatorDefinition definition) boolean
This method will check if a message exists for the specified id.This method returns the id of the application.Channel[]
This method returns an array containing all the defined channels.getConnectionDefinition
(String name, ConnectionType type) This method returns the value connection definition for the specified name.This method returns an array containing the names of the connection definitions that are available.This method returns the connection manager for this project.Returns the default language for an application.Returns the default theme for an application.This method returns the description of the application.getExpanderByName
(String expanderName) This method returns the expander definition for the specified name.getFieldTypeByName
(String name) Returns the field type with the given name, if no field type exists anUnknownFieldTypeException
will be thrownReturns an array with all the field types definition.Returns the global parameter with the given name, if no global parameter exists anUnknownGlobalParameterException
will be thrownReturns an array with all the global parameters definition.getLanguageByCode
(String code) This method returns the language specified for the given language code.final ILanguage
getLanguageByName
(String languageName) This method returns the language specified for the given name.This method returns an array of all the languages that are defined to the application.getMessage
(String id) This method returns the message object belonging to the specified id.getMessage
(String id, String[] parameters) This method returns the message object belonging to the specified id.getName()
This method returns the (technical) name of the application for which the metamodel is defined.Returns the portal message with the given name, if no portal message exists an UnknowPortalMessageException will be throwngetRoleByName
(String name) This method returns the role specified for the given name.IRole[]
getRoles()
This method returns an array containing all the defined roles.getServiceByName
(String serviceName) This method returns the service definition for the specified name.Team[]
getTeams()
This method returns an array containing all the defined teams.Theme[]
This method returns an array of all the themes that are defined to the application.getValidatorByName
(String name) This method returns the validator definition for the specified type name.String[]
This method returns an array containing the names of the (custom) validators that are available.getValueFormat
(String name) This method may be used to retrieve the value format for a specified name.This method returns the value format definition for the specified name.This method returns an array containing the names of the value formats that are available.This method returns an array containing the available value formats.This method returns the version of the application for which the metamodel is defined.protected static boolean
isValidName
(String name)
-
Constructor Details
-
Project
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
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. -
getDescription
Description copied from interface:IProject
This method returns the description of the application. The description of an application is optional, and as such, this method may return a null value.- Specified by:
getDescription
in interfaceIProject
- Returns:
- The description of the application.
-
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 interfaceIProject
- Returns:
- The version of the application.
-
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 interfaceIProject
- Returns:
- Array containing all the language definitions.
-
getLanguageByCode
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 interfaceIProject
- Parameters:
code
- of the language that is requested.- Returns:
- The language definition for the specified code.
-
getLanguageByName
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 interfaceIProject
- Parameters:
languageName
- of the language that is requested.- Returns:
- The language definition for the specified name.
-
getTeams
Description copied from interface:IProject
This method returns an array containing all the defined teams. -
getRoles
Description copied from interface:IProject
This method returns an array containing all the defined roles. -
getChannels
Description copied from interface:IProject
This method returns an array containing all the defined channels.- Specified by:
getChannels
in interfaceIProject
- Returns:
- array containing all the defined channels
-
getDefaultLanguage
Description copied from interface:IProject
Returns the default language for an application.- Specified by:
getDefaultLanguage
in interfaceIProject
- Returns:
- The default language for the application.
-
addMessage
-
containsMessage
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 interfaceIProject
- Parameters:
id
- String containing the name (id)- Returns:
- Boolean indicating if a message is defined for the specified id.
-
getMessage
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 interfaceIProject
- Parameters:
id
- Identifier of the message that is requested.- Returns:
- Message object for the specified id.
-
getMessage
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 interfaceIProject
- 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
Description copied from interface:IProject
Returns the default theme for an application.- Specified by:
getDefaultTheme
in interfaceIProject
- Returns:
- The default theme for the application.
-
getThemes
Description copied from interface:IProject
This method returns an array of all the themes that are defined to the application. -
getValueFormat
Description copied from interface:IProject
This method may be used to retrieve the value format for a specified name.- Specified by:
getValueFormat
in interfaceIProject
- Parameters:
name
- The name of the requested value format.- Returns:
- The value format for the specified name.
-
getValueFormats
Description copied from interface:IProject
This method returns an array containing the available value formats.- Specified by:
getValueFormats
in interfaceIProject
- Returns:
- an array containing the available value formats.
-
addExpander
-
getExpanderByName
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 interfaceIProject
- Parameters:
expanderName
- The name of the expander whose definition is requested.- Returns:
- The definition of the expander with the specified name.
-
addService
-
isValidName
-
getServiceByName
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 interfaceIProject
- Parameters:
serviceName
- The name of the service whose definition is requested.- Returns:
- The definition of the service with the specified name.
-
getValidatorByName
Description copied from interface:IProject
This method returns the validator definition for the specified type name.- Specified by:
getValidatorByName
in interfaceIProject
- Parameters:
name
- The type name of the requested validator.- Returns:
- The validator definition for the specified type name.
-
addValidator
-
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 interfaceIProject
- Returns:
- array containing the names of the (custom) validators that are available.
-
getValueFormatDefinition
Description copied from interface:IProject
This method returns the value format definition for the specified name.- Specified by:
getValueFormatDefinition
in interfaceIProject
- Parameters:
name
- The name of the requested value format.- Returns:
- The value format definition for the specified name.
-
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 interfaceIProject
- Returns:
- array containing the names of the value formats that are available.
-
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 interfaceIProject
- Returns:
- The connection manager for this project.
-
getConnectionDefinition
Description copied from interface:IProject
This method returns the value connection definition for the specified name.- Specified by:
getConnectionDefinition
in interfaceIProject
- 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
Description copied from interface:IProject
This method returns an array containing the names of the connection definitions that are available.- Specified by:
getConnectionDefinitions
in interfaceIProject
- Parameters:
type
- The type of the requested connection definitions.- Returns:
- array containing the names of the connection definitions that are available.
-
addConnection
-
getRoleByName
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 interfaceIProject
- Parameters:
name
- of the role that is requested.- Returns:
- The role definition for the specified name.
-
addRole
-
getApplicationId
Description copied from interface:IProject
This method returns the id of the application.- Specified by:
getApplicationId
in interfaceIProject
- Returns:
- The id of the application.
-
getPortalMessageDefinitionByName
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 interfaceIProject
- Parameters:
name
- the name of the portal message- Returns:
- the portal message definition
-
addPortalMessage
-
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 interfaceIProject
- Returns:
- the available global parameters or an empty array
-
addGlobalParameter
-
getGlobalParameterByName
Description copied from interface:IProject
Returns the global parameter with the given name, if no global parameter exists anUnknownGlobalParameterException
will be thrown- Specified by:
getGlobalParameterByName
in interfaceIProject
- Parameters:
name
- - name of the global parameter's definition to be returned- Returns:
- - the global parameter's definition
-
addFieldType
-
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 interfaceIProject
- Returns:
- the available field types or an empty array
-
getFieldTypeByName
Description copied from interface:IProject
Returns the field type with the given name, if no field type exists anUnknownFieldTypeException
will be thrown- Specified by:
getFieldTypeByName
in interfaceIProject
- Parameters:
name
- - name of the field type's definition to be returned- Returns:
- - the field type's definition
-