Class ApplicationConfig
java.lang.Object
com.aquima.interactions.portal.model.ApplicationConfig
- All Implemented Interfaces:
IApplicationConfig
,IProject
,Serializable
This class holds the configuration settings of an application.
- Since:
- 6.0
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ApplicationConfig
(IApplicationDS datasource, IProject model, IFlowDetails[] availableFlows) -
Method Summary
Modifier and TypeMethodDescriptionboolean
This method returns a boolean indicating if caching should be enabled for this application.boolean
This method will check if a message exists for the specified id.This method returns the id of the application.This function returns the current application mode.This method returns an array containing the flows that may be started in 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.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.getLanguageByName
(String name) 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.boolean
This method returns a boolean indicating if failed masks must be included, or that the cause of the failure should be thrown as an exception.toString()
boolean
This method returns a boolean indicating if elements that fail expansion should be replaced by failed element objects, or that the cause of the failure should be thrown as an exception.
-
Constructor Details
-
ApplicationConfig
protected ApplicationConfig(IApplicationDS datasource, IProject model, IFlowDetails[] availableFlows)
-
-
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. -
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.
-
cachingEnabled
public boolean cachingEnabled()Description copied from interface:IApplicationConfig
This method returns a boolean indicating if caching should be enabled for this application. When the method returns false, each new session will (re)load the application model from the data source.- Specified by:
cachingEnabled
in interfaceIApplicationConfig
- Returns:
- a boolean indicating if caching should be enabled for this application.
-
getApplicationMode
Description copied from interface:IApplicationConfig
This function returns the current application mode. Never returns null- Specified by:
getApplicationMode
in interfaceIApplicationConfig
- Returns:
- The application mode for this application.
-
getAvailableFlows
Description copied from interface:IApplicationConfig
This method returns an array containing the flows that may be started in the application.- Specified by:
getAvailableFlows
in interfaceIApplicationConfig
- Returns:
- an array containing the flows that may be started in the application.
-
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.
-
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.
-
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.
-
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. -
getThemes
Description copied from interface:IProject
This method returns an array of all the themes that are defined to the application. -
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.
-
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:
name
- of the language that is requested.- Returns:
- The language definition for the specified name.
-
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.
-
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.
-
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.
-
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.
-
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.
-
outputFailedMasks
public boolean outputFailedMasks()Description copied from interface:IApplicationConfig
This method returns a boolean indicating if failed masks must be included, or that the cause of the failure should be thrown as an exception.- Specified by:
outputFailedMasks
in interfaceIApplicationConfig
- Returns:
- a boolean indicating if mask that fails should be included in the expanded element
-
wrapFailedElements
public boolean wrapFailedElements()Description copied from interface:IApplicationConfig
This method returns a boolean indicating if elements that fail expansion should be replaced by failed element objects, or that the cause of the failure should be thrown as an exception.- Specified by:
wrapFailedElements
in interfaceIApplicationConfig
- Returns:
- a boolean indicating if elements that fail expansion should be replaced by failed element objects.
-
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.
-
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.
-
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.
-
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.
-
toString
-
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
-
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
-
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
-
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
-