Class DefaultApplicationConfiguration

java.lang.Object
com.aquima.interactions.ds.DefaultApplicationConfiguration
All Implemented Interfaces:
IApplicationConfiguration, IConfiguration

public class DefaultApplicationConfiguration extends Object implements IApplicationConfiguration
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 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 interface IApplicationConfiguration
      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

      public 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. 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

      public boolean isContextImmutableFor(String containerType)
      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 interface IApplicationConfiguration
      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 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.

      The default recommended value for this function is false.
      Specified by:
      isTargetDownCastingEnabled in interface IApplicationConfiguration
      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

      public String 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 interface IApplicationConfiguration
      Returns:
      The version of the parser that should be used.
    • setParserVersion

      public void setParserVersion(String parserVersion)
      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

      public ApplicationMode getApplicationMode()
      Description copied from interface: IApplicationConfiguration
      This method returns the application mode the application should run in.
      Specified by:
      getApplicationMode in interface IApplicationConfiguration
      Returns:
      the application mode the application should run in.
    • setApplicationMode

      public void setApplicationMode(ApplicationMode applicationMode)
      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

      public IFactoryManager getFactoryManager()
      Description copied from interface: IConfiguration
      This method returns the factory manager that should be used.
      Specified by:
      getFactoryManager in interface IConfiguration
      Returns:
      The factory manager.
    • setFactoryManager

      public void setFactoryManager(IFactoryManager factoryManager)
      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

      public IResourceManager getResourceManager()
      Description copied from interface: IConfiguration
      This method returns the resource manager that should be used.
      Specified by:
      getResourceManager in interface IConfiguration
      Returns:
      The resource manager.
    • setResourceManager

      public void setResourceManager(IResourceManager resourceManager)
      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

      public IConnectionManager 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 interface IApplicationConfiguration
      Returns:
      an application specific connection manager.
    • setConnectionManager

      public void setConnectionManager(IConnectionManager manager)
      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 interface IApplicationConfiguration
      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 interface IApplicationConfiguration
      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

      public void setLanguageFormatMappings(List<LanguageFormatDefinition> languageFormats)
      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

      public String getFormatName(String languageCode, DataType type)
      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 interface IApplicationConfiguration
      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

      public void setValueFormats(List<ValueFormatDefinition> valueFormats)
      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

      public ValueFormatDefinition[] 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 interface IApplicationConfiguration
      Returns:
      An array containing value format definitions that were added in the application configuration.
    • setRules

      public void setRules(List<RuleDefinition> ruleDefinitions)
      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

      public RuleDefinition[] getRuleDefinitions(String moduleName)
      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 interface IApplicationConfiguration
      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

      public IProcessCaseDao 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 interface IApplicationConfiguration
      Returns:
      The case DAO that should be used by the process engine.
    • setProcessCaseDao

      public void setProcessCaseDao(IProcessCaseDao dao)
      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

      public ITraceDao 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 interface IApplicationConfiguration
      Returns:
      The trace DAO that should be used by the trace engine.
    • setTraceDao

      public void setTraceDao(ITraceDao dao)
    • getTimelineCreator

      public ITimelineCreator 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 interface IApplicationConfiguration
      Returns:
      The timeline DAO that should be used by the trace engine.
    • setTimelineCreator

      public void setTimelineCreator(ITimelineCreator timelineCreator)