Package com.aquima.interactions.ds
Class DefaultApplicationConfiguration
java.lang.Object
com.aquima.interactions.ds.DefaultApplicationConfiguration
- All Implemented Interfaces:
IApplicationConfiguration
,IConfiguration
Application configuration implementation that may be used to start an application with the default settings, or as
base class for a custom configuration.
- Since:
- 6.4
- Author:
- O. Kerpershoek
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicating if models should be cached on the server.boolean
This method returns the application mode the application should run in.This method may return an application specific connection manager.This method returns the factory manager that should be used.getFormatName
(String languageCode, DataType type) This method should return the value format name of the format defined in Studio that should be used to convert values of this type for the specified language.This method returns the version of the parser that should be used.This method returns the case DAO that should be used by the process engine.This method returns the resource manager that should be used.getRuleDefinitions
(String moduleName) This method returns an array containing definitions of the custom business rules for the application.This method returns the timeline DAO that should be used by the trace engine.This method returns the trace DAO that should be used by the trace engine.This method returns an array containing value format definitions that were added in the application configuration.boolean
isContextImmutableFor
(String containerType) This method returns a boolean indicating if the context of a container should be read-only during the expand phase.boolean
Represents the down casting function for decision tables, since studio 5 allows one for correctly defining decision-tables.boolean
This method returns a boolean indicating if failed masks must be included in the expanded element, or that the cause of the failure should be thrown as an exception.void
setApplicationMode
(ApplicationMode applicationMode) This method can be used to specify the application mode.void
setCachingEnabled
(boolean cachingEnabled) This method allows for enabling or disabling of the application cache.void
setClearEventOnRefresh
(boolean clearEventOnRefresh) This method configures whether the system event is cleared when a page refresh is executed.void
setConnectionManager
(IConnectionManager manager) This method may be used to specify the application specific connection manager.void
setContextMutableFor
(List<String> containerTypes) This method can be used to configure if the context should not be read only during the expand of a container.void
setFactoryManager
(IFactoryManager factoryManager) This method may be used to specify an application specific factory manager.void
setLanguageFormatMappings
(List<LanguageFormatDefinition> languageFormats) This method may be used to specify language format mappings.void
setOutputFailedMasks
(boolean value) This method may be used to set whether failed masks should be outputted.void
setParserVersion
(String parserVersion) This method may be used to specify the version of the expression parser that should be used.void
This method may be used to specify the case DAO that should be used by the process engine.void
setResourceManager
(IResourceManager resourceManager) This method may be used to specify an application specific resource manager.void
setRules
(List<RuleDefinition> ruleDefinitions) This method may be used to specify additional rule definitions.void
setTargetDownCastingEnabled
(boolean enable) This method can be used to configure if the targets of a rule may be down casted automatically when needed to the correct type of the rule's target.void
setTimelineCreator
(ITimelineCreator timelineCreator) void
setTraceDao
(ITraceDao dao) void
setValueFormats
(List<ValueFormatDefinition> valueFormats) This method may be used to specify additional value format definitions.void
setWrapFailedElements
(boolean value) This method may be used to set whether failed elements should be wrapped.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
-
DefaultApplicationConfiguration
public DefaultApplicationConfiguration()
-
-
Method Details
-
setCachingEnabled
public void setCachingEnabled(boolean cachingEnabled) This method allows for enabling or disabling of the application cache. A caching solution is more efficient when creating a session since it will use a load-once-use many system.- Parameters:
cachingEnabled
- A boolean indicating caching is enabled.
-
cachingEnabled
public boolean cachingEnabled()Description copied from interface:IApplicationConfiguration
Indicating if models should be cached on the server.- Specified by:
cachingEnabled
in interfaceIApplicationConfiguration
- Returns:
- a boolean indicating if application models should be cached.
-
setClearEventOnRefresh
public void setClearEventOnRefresh(boolean clearEventOnRefresh) This method configures whether the system event is cleared when a page refresh is executed. The default for this setting is false; meaning the even will not be cleared on a refresh.- Parameters:
clearEventOnRefresh
- A boolean indicating the system even should be cleared during a page-refresh.
-
clearEventOnRefresh
public boolean clearEventOnRefresh() -
setContextMutableFor
This method can be used to configure if the context should not be read only during the expand of a container. By default the context will be read-only for all containers.- Parameters:
containerTypes
- boolean List containing the container type names for which the context should not be read-only.
-
isContextImmutableFor
Description copied from interface:IApplicationConfiguration
This method returns a boolean indicating if the context of a container should be read-only during the expand phase.- Specified by:
isContextImmutableFor
in interfaceIApplicationConfiguration
- Parameters:
containerType
- The container type name for which the immutable setting is requested.- Returns:
- a boolean indicating if the context of a container should be read-only during the expand phase.
-
isTargetDownCastingEnabled
public boolean isTargetDownCastingEnabled()Description copied from interface:IApplicationConfiguration
Represents the down casting function for decision tables, since studio 5 allows one for correctly defining decision-tables. This feature is a configuration option for users wanting to enable backwards compatibility.Historical background:
The default recommended value for this function is false.
The 4.2 model allows rules to be defined with source attributes that belong to a more specific entity than the entity of the target attributes. In order to 'correctly' handle these rules the target attributes need to be down-casted to the more specific entity type.- Specified by:
isTargetDownCastingEnabled
in interfaceIApplicationConfiguration
- Returns:
- A boolean indicating the old down-casting feature should be enabled.
-
setTargetDownCastingEnabled
public void setTargetDownCastingEnabled(boolean enable) This method can be used to configure if the targets of a rule may be down casted automatically when needed to the correct type of the rule's target. The default for this option is false.- Parameters:
enable
- Boolean indicating if targets may be automatically down casted to the correct type.
-
getParserVersion
Description copied from interface:IApplicationConfiguration
This method returns the version of the parser that should be used. At the moment there are two parser versions available:- Version 6.x and lower, which will accept most expressions including various obsolete R4 constructions.
- Version 7.x or higher, which will accept only valid R6 expressions and additions made for R7.
- Specified by:
getParserVersion
in interfaceIApplicationConfiguration
- Returns:
- The version of the parser that should be used.
-
setParserVersion
This method may be used to specify the version of the expression parser that should be used. The default for this option is equal to the version of the runtime (for instance 6.4).- Parameters:
parserVersion
- the version of the expression parser that should be used.
-
getApplicationMode
Description copied from interface:IApplicationConfiguration
This method returns the application mode the application should run in.- Specified by:
getApplicationMode
in interfaceIApplicationConfiguration
- Returns:
- the application mode the application should run in.
-
setApplicationMode
This method can be used to specify the application mode. The default for this option is ApplicationMode.DEV- Parameters:
applicationMode
- The application mode that should be used.
-
getFactoryManager
Description copied from interface:IConfiguration
This method returns the factory manager that should be used.- Specified by:
getFactoryManager
in interfaceIConfiguration
- Returns:
- The factory manager.
-
setFactoryManager
This method may be used to specify an application specific factory manager. By default, the application configuration does not have a factory manager.- Parameters:
factoryManager
- The application specific factory manager that should be used.
-
getResourceManager
Description copied from interface:IConfiguration
This method returns the resource manager that should be used.- Specified by:
getResourceManager
in interfaceIConfiguration
- Returns:
- The resource manager.
-
setResourceManager
This method may be used to specify an application specific resource manager. By default, the application configuration does not have a resource manager.- Parameters:
resourceManager
- The application specific resource manager that should be used.
-
getConnectionManager
Description copied from interface:IApplicationConfiguration
This method may return an application specific connection manager. The connection manager will be available in the context of the services and containers to request predefined connections.- Specified by:
getConnectionManager
in interfaceIApplicationConfiguration
- Returns:
- an application specific connection manager.
-
setConnectionManager
This method may be used to specify the application specific connection manager. By default, the application configuration does not have a connection manager.- Parameters:
manager
- The application specific connection manager.
-
outputFailedMasks
public boolean outputFailedMasks()Description copied from interface:IApplicationConfiguration
This method returns a boolean indicating if failed masks must be included in the expanded element, or that the cause of the failure should be thrown as an exception.- Specified by:
outputFailedMasks
in interfaceIApplicationConfiguration
- Returns:
- a boolean indicating if mask that fails should be included in the expanded element.
-
setOutputFailedMasks
public void setOutputFailedMasks(boolean value) This method may be used to set whether failed masks should be outputted.- Parameters:
value
- whether failed masks should be outputted.
-
wrapFailedElements
public boolean wrapFailedElements()Description copied from interface:IApplicationConfiguration
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 interfaceIApplicationConfiguration
- Returns:
- a boolean indicating if elements that fail expansion should be replaced by failed element objects.
-
setWrapFailedElements
public void setWrapFailedElements(boolean value) This method may be used to set whether failed elements should be wrapped.- Parameters:
value
- whether elements masks should be wrapped.
-
setLanguageFormatMappings
This method may be used to specify language format mappings. The list passed to this method should contain objects of the LanguageFormatDefinition class (or that extend it).- Parameters:
languageFormats
- List containing the language format definitions.- See Also:
-
getFormatName
Description copied from interface:IApplicationConfiguration
This method should return the value format name of the format defined in Studio that should be used to convert values of this type for the specified language.- Specified by:
getFormatName
in interfaceIApplicationConfiguration
- Parameters:
languageCode
- The language code for which the format name is requested.type
- The data type for which the format name is requested.- Returns:
- The name of the value format that should be used for this language type combination.
-
setValueFormats
This method may be used to specify additional value format definitions. The list passed to this method should contain objects of the ValueFormatDefinition class (or that extend it).- Parameters:
valueFormats
- List containing additional value format definitions.- See Also:
-
getValueFormatDefinitions
Description copied from interface:IApplicationConfiguration
This method returns an array containing value format definitions that were added in the application configuration. Normally all the value formats should be specified in Studio, but the application configuration may choose to add custom value formats to override the default format from studio.- Specified by:
getValueFormatDefinitions
in interfaceIApplicationConfiguration
- Returns:
- An array containing value format definitions that were added in the application configuration.
-
setRules
This method may be used to specify additional rule definitions. The list passed to this method should contain objects of the RuleDefinition class (or that extend it).- Parameters:
ruleDefinitions
- List containing additional rule definitions.- See Also:
-
getRuleDefinitions
Description copied from interface:IApplicationConfiguration
This method returns an array containing definitions of the custom business rules for the application. The rule factory is used to locate the actual implementation of the rules. Once the custom business rules can be defined in studio, this method will become obsolete.- Specified by:
getRuleDefinitions
in interfaceIApplicationConfiguration
- Parameters:
moduleName
- The name of the module that contains the rules.- Returns:
- an array containing definitions of the custom business rules for the application.
-
getProcessCaseDao
Description copied from interface:IApplicationConfiguration
This method returns the case DAO that should be used by the process engine. By default an in-memory DAO will be used. This method is only relevant for applications using a process engine, and will probably be deprecated once the process engine can be configured separate from the applications using it.- Specified by:
getProcessCaseDao
in interfaceIApplicationConfiguration
- Returns:
- The case DAO that should be used by the process engine.
-
setProcessCaseDao
This method may be used to specify the case DAO that should be used by the process engine. By default, a null case DAO will be used.- Parameters:
dao
- The case DAO that should be used by the process engine.
-
getTraceDao
Description copied from interface:IApplicationConfiguration
This method returns the trace DAO that should be used by the trace engine. By default an in-memory DAO will be used.- Specified by:
getTraceDao
in interfaceIApplicationConfiguration
- Returns:
- The trace DAO that should be used by the trace engine.
-
setTraceDao
-
getTimelineCreator
Description copied from interface:IApplicationConfiguration
This method returns the timeline DAO that should be used by the trace engine. By default an in-memory DAO will be used.- Specified by:
getTimelineCreator
in interfaceIApplicationConfiguration
- Returns:
- The timeline DAO that should be used by the trace engine.
-
setTimelineCreator
-