Package com.axelor.app
Class AppSettings
java.lang.Object
com.axelor.app.AppSettings
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disableFeature
(String name) Disable specified featurevoid
enableFeature
(String name) Enable specified featureFormat the property value.static AppSettings
get()
Retrieves the base URL for the application.boolean
getBoolean
(String key, boolean defaultValue) int
For internal use only.<T> List
<T> long
For internal use only.Get all properties keysgetPropertiesKeysStartingWith
(String prefix) Get properties keys starting with the given prefixgetPropertiesStartingWith
(String prefix) Get properties where the key start with the given prefixprotected String
getTenantBaseUrl
(String tenantId) boolean
hasFeature
(String name) Check whether specified feature is enabledboolean
-
Method Details
-
get
-
get
-
get
-
getList
-
getList
-
getInt
-
getLong
-
getBoolean
-
getPath
-
format
Format the property value. Variables in the format${}
format will be substituted.- Parameters:
value
- the property value- Returns:
- the formatted property value
-
getBaseURL
Retrieves the base URL for the application.The base URL is determined through the following order:
1. If a tenant identifier is resolved and its corresponding host is available, that host is used.
2. If no tenant-specific host is found, the application base URL from theapplication.base-url
configuration setting is used.
3. If neither are available, the base URL is retrieved from the current http request.- Returns:
- the resolved base URL for the application
-
getTenantBaseUrl
-
isProduction
public boolean isProduction() -
getInternalProperties
For internal use only.- Returns:
- the internal properties store
-
getProperties
For internal use only.- Returns:
- the internal properties store
-
getPropertiesKeys
Get all properties keys- Returns:
- an unmodifiable
Set
of keys
-
getPropertiesKeysStartingWith
Get properties keys starting with the given prefix- Returns:
- an unmodifiable
Set
of keys
-
getPropertiesStartingWith
Get properties where the key start with the given prefix- Returns:
- an unmodifiable
Map
of matching properties
-
enableFeature
Enable specified feature- Parameters:
name
- name of the feature
-
disableFeature
Disable specified feature- Parameters:
name
- name of the feature
-
hasFeature
Check whether specified feature is enabled- Parameters:
name
- name of the feature- Returns:
- true if feature is enabled false otherwise
-