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 AppSettingsget()Stringget(String key)Stringget(String key, String defaultValue)StringgetBaseURL()Get the application base URL.booleangetBoolean(String key, boolean defaultValue)intgetInt(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)StringgetPath(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 prefixbooleanisProduction()
-
-
-
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-urlconfiguration 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
Setof keys
-
getPropertiesKeysStartingWith
public Set<String> getPropertiesKeysStartingWith(String prefix)
Get properties keys starting with the given prefix- Returns:
- an unmodifiable
Setof keys
-
-