Application configuration
Syntax
appConfig(service: "my.Service")
appConfig(config: "my.Configuration")
Description
Returns the named configuration object of the running application. Either a service configuration or a general configuration object can be requested.
Services are configured in the XML application configuration at application/services/config. appConfig(service: "my.Service") provides the configuration object for the service my.Service, which is defined in the application configuration at <config service-class="my.Service">.
General configurations are configured in the XML application configuration under "application/configs/config".
Parameters
| Name | Type | Type Description | Mandatory | Default |
|---|---|---|---|---|
| service | Character string | Name of the service | no | |
| config | Character string | Name of the configuration object | no |
Either the parameter service or config must be specified, but not both.
Return value
Type: XML configuration object.
Either the service configuration or the general configuration object with a given name.
Examples
Versioning the persistence layer
appConfig(service: "com.top_logic.knowledge.service.KnowledgeBaseFactory")
["knowledge-bases"]["Default"]["disable-versioning"]
Output: false
Whether versioning is switched off globally in the persistence layer.
The login page of the application
appConfig(config: "com.top_logic.base.accesscontrol.ApplicationPages$Config")
["loginPage"]
Output: "/login.jsp"
The configured login page of the application.