Package com.axelor.app
Class AppSettings
- java.lang.Object
-
- com.axelor.app.AppSettings
-
public final class AppSettings extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AppSettings
get()
String
get(String key)
String
get(String key, String defaultValue)
String
getBaseURL()
Get the application base URL.boolean
getBoolean(String key, boolean defaultValue)
int
getInt(String key, int defaultValue)
Map<String,String>
getInternalProperties()
For internal use only.List<String>
getList(String key)
<T> List<T>
getList(String key, Function<String,T> mapper)
String
getPath(String key, String defaultValue)
Map<String,String>
getProperties()
For internal use only.Set<String>
getPropertiesKeys()
Get all properties keysSet<String>
getPropertiesKeysStartingWith(String prefix)
Get properties keys starting with the given prefixMap<String,String>
getPropertiesStartingWith(String prefix)
Get properties where the key start with the given prefixboolean
isProduction()
-
-
-
Method Detail
-
get
public static AppSettings get()
-
getInt
public int getInt(String key, int defaultValue)
-
getBoolean
public boolean getBoolean(String key, boolean defaultValue)
-
getBaseURL
public String getBaseURL()
Get the application base URL.This method tries to calculate the base url from current http request. If the method is called outside of http request scope, it returns the value of
application.base-url
configuration setting.- Returns:
- application base url
-
isProduction
public boolean isProduction()
-
getInternalProperties
public Map<String,String> getInternalProperties()
For internal use only.- Returns:
- the internal properties store
-
getProperties
public Map<String,String> getProperties()
For internal use only.- Returns:
- the internal properties store
-
getPropertiesKeys
public Set<String> getPropertiesKeys()
Get all properties keys- Returns:
- an unmodifiable
Set
of keys
-
getPropertiesKeysStartingWith
public Set<String> getPropertiesKeysStartingWith(String prefix)
Get properties keys starting with the given prefix- Returns:
- an unmodifiable
Set
of keys
-
-