Package com.axelor.app
Class AppSettings
java.lang.Object
com.axelor.app.AppSettings
-
Method Summary
Modifier and TypeMethodDescriptionvoiddisableFeature(String name) Disable specified featurevoidenableFeature(String name) Enable specified featureFormat the property value.static AppSettingsget()Retrieves the base URL for the application.booleangetBoolean(String key, boolean defaultValue) intFor internal use only.<T> List<T> longFor 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 StringgetTenantBaseUrl(String tenantId) booleanhasFeature(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-urlconfiguration 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
Setof keys
-
getPropertiesKeysStartingWith
Get properties keys starting with the given prefix- Returns:
- an unmodifiable
Setof keys
-
getPropertiesStartingWith
Get properties where the key start with the given prefix- Returns:
- an unmodifiable
Mapof 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
-